/* Base Styles */
.rrreviews-form-wrap,
.rrreviews-list,
.rrreviews-avg-rating-block {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fff;
  border-radius: 15px;
  
}

/* Review Form */
.rrreviews-form-wrap {
  max-width: 90%;
  margin: 20px auto;
  padding: 2em;
}

.rrreviews-form-wrap label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
  color: #444;
  font-size: 1em;
}

.rrreviews-form-wrap input[type="text"],
.rrreviews-form-wrap textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.7em 1em;
  margin-bottom: 0.5em;
  font-size: 1em;
  background: #fafbff;
  transition: border 0.2s;
}

.rrreviews-form-wrap input[type="text"]:focus,
.rrreviews-form-wrap textarea:focus {
  border: 1.5px solid #9587ea;
  outline: none;
}

/* Star Rating */
.rrreviews-stars {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.rrreviews-stars input[type="radio"] {
  display: none;
}

.rrreviews-stars label {
  font-size: 2.1em;
  color: #e5e5e5;
  cursor: pointer;
  transition: color 0.15s;
  margin: 0 2px;
  user-select: none;
  filter: drop-shadow(0 1px 1px #fff2);
}

.rrreviews-stars input[type="radio"]:checked ~ label,
.rrreviews-stars label:hover,
.rrreviews-stars label:hover ~ label {
  color: #f6b900;
  text-shadow: 0 1px 3px #ecd36c77;
}

/* Form Buttons */
.rrreviews-form-wrap button[type="submit"] {
  background: linear-gradient(90deg, #8c6af1, #4f9afd);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.8em 2.2em;
  font-size: 1em;
  font-weight: 600;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 1px 7px #4f9afd2a;
}

.rrreviews-form-wrap button[type="submit"]:hover {
  background: linear-gradient(90deg, #4f9afd, #8c6af1);
}

/* File Upload */
.rr-custom-file {
  position: relative;
  display: inline-block;
  width: 90%;
}

.rr-custom-file input[type="file"] {
  opacity: 0;
  width: 100%;
  height: 48px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  cursor: pointer;
}

.rr-custom-file-label {
  display: block;
  background: #eef0fa;
  color: #333;
  padding: 0.9em 1.2em;
  border-radius: 7px;
  font-weight: 500;
  font-size: 1em;
  text-align: left;
  cursor: pointer;
  border: 1px solid #e2e7fb;
  position: relative;
  z-index: 2;
  transition: border 0.18s;
}

.rr-custom-file-label.selected {
  border: 1.5px solid #4f9afd;
  color: #4f9afd;
}

.rr-custom-file-label:after {
  content: "📷";
  float: right;
  font-size: 1.1em;
  opacity: 0.7;
}

#rr-file-name {
  font-size: 0.95em;
  color: #666;
  margin: 4px 0 0 2px;
  display: block;
  word-break: break-all;
}

/* Reviews List */
.rrreviews-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 12px;
}

.rrreview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px #4f9afd13;
  padding: 22px 18px;
  transition: box-shadow 0.16s, transform 0.12s;
  border: 1px solid #ecf2fa;
  position: relative;
  min-height: 240px;
}

.rrreview:hover {
  box-shadow: 0 4px 28px #7bb7fc24;
  transform: translateY(-2px) scale(1.01);
}

.rrreview-main {
  flex: 1;
  min-width: 0;
}

.rrreview-title {
  font-size: 1.32em;
  font-weight: bold;
  margin-bottom: 3px;
  color: #1d334a;
  letter-spacing: 0.01em;
}

.rrreview-rating-row {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
  gap: 11px;
}

.rrreview-stars-list .rr-star {
  font-size: 2em;
  color: #e5e5e5;
}

.rrreview-stars-list .rr-star-full {
  color: #ffc107;
  text-shadow: 0 2px 4px #ffb60030;
}

.rrreview-date {
  color: #7b8ca2;
  font-size: 0.8em;
  font-weight: 400;
  white-space: nowrap;
  padding-left:10px;
}

.rrreview-text {
  font-size: 1.1em;
  color: #344155;
  margin: 4px 0 10px;
  line-height: 1.5;
  max-height: none;
  overflow: hidden;
  position: relative;
}

.rrreview-text.collapsed {
  max-height: 100px;
}

.rrreview-text.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 100%);
}

.rrreview-username {
      font-size: 1em;
    color: #8f8f8f;
    font-style: italic;
    margin-bottom: 0.3em;
    font-family: 'Open Sans';
    font-weight: 200;
}

.rr-admin-reply {
  margin-top: 13px;
  border-left: 3px solid #7bb7fc;
  padding-left: 1em;
  color: #357;
  opacity: 0.9;
  background: #f2f8ff;
  border-radius: 0 0 9px 9px;
  font-size: 0.99em;
  margin-bottom: 5px;
}

/* Review Photos */
.rrreview-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.rrreview-photos img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 7px #8c6af128;
  background: #f5f7fa;
  border: 1px solid #f1f3fa;
  transition: transform 0.15s, box-shadow 0.13s;
  cursor: pointer;
}

.rrreview-photos img:hover {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 4px 18px #8c6af128;
}

.rrreview-img-placeholder img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  opacity: 0.4;
  border-radius: 10px;
  background: #f5f7fa;
  border: 1px solid #f1f3fa;
  box-shadow: 0 2px 7px #aab0bb12;
}

/* Read More Button */
.rr-read-more-btn {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  padding: 5px 0;
  font-size: 14px;
  margin-left: auto;
  display: block;
}

.rr-read-more-btn:hover {
  text-decoration: underline;
}

/* Average Rating Block */
.rrreviews-avg-rating-block {
  position: sticky;
  top: 16px;
  z-index: 100;
  max-width: 420px;
  margin: 32px auto 20px;
  padding: 22px 15px;
  box-shadow: 0 2px 16px #bcd2d880;
  text-align: center;
}

.rrreviews-avg-rating-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 3px;
}

.rrreviews-avg-rating-value {
  font-size: 2em;
  font-weight: 700;
  color: #374151;
  letter-spacing: 1px;
  line-height: 1;
}

.rrreviews-avg-rating-stars {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 40px;
}

.rr-star {
  line-height: 1;
  color: #ffc107;
  display: inline-block;
  width: 0.5em;
  position: relative;
  text-shadow: 0 2px 4px #ffb60030;
}

.rr-star-empty {
  color: #e5e5e5;
  text-shadow: none;
}

.rr-star-half {
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

.rr-star-half .rr-star-base {
  color: #ffc107;
  position: absolute;
  left: 0;
  top: 0;
  width: 0.5em;
  height: 1em;
  overflow: hidden;
  z-index: 2;
}

.rr-star-half .rr-star-bg {
  color: #e5e5e5;
  position: absolute;
  left: 0;
  top: 0;
  width: 1em;
  height: 1em;
  z-index: 1;
}

.rr-star-half .rr-star-overlay {
  color: #ffc107;
  position: absolute;
  left: 0;
  top: 0;
  width: 0.5em;
  overflow: hidden;
  z-index: 2;
}

.rrreviews-avg-rating-desc {
  color: #444;
  font-size: 1.09em;
  margin-top: 9px;
  font-weight: 400;
  word-break: break-word;
}

/* Lightbox */
.rr-lightbox-overlay {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(34, 34, 34, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s;
}

.rr-lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.rr-lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 8px 32px #0004;
  border: 4px solid #fff;
  animation: rrLightboxZoom 0.2s;
  background: #fff;
}

@keyframes rrLightboxZoom {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.rr-lightbox-close {
  position: absolute;
  top: 26px;
  right: 36px;
  font-size: 2.4em;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  z-index: 999999;
  text-shadow: 0 2px 10px #000;
}

.rr-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3em;
  color: #fff;
  z-index: 100000;
  cursor: pointer;
  padding: 0 10px;
  user-select: none;
  opacity: 0.85;
}

.rr-lightbox-arrow:hover {
  opacity: 1;
  text-shadow: 0 2px 10px #000;
}

#rr-lightbox-prev {
  left: 30px;
}

#rr-lightbox-next {
  right: 30px;
}

/* Review Modal */
.rr-review-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.rr-review-modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.rr-review-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.rr-review-modal-title {
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: bold;
}

.rr-review-modal-rating {
  margin-bottom: 10px;
}

.rr-review-modal-text {
  line-height: 1.6;
  margin-bottom: 15px;
}

.rr-review-modal-meta {
  font-style: italic;
  color: #666;
}

/* Pagination */
.rrreviews-pagination {
  margin: 20px 0;
  text-align: center;
}

.rrreviews-pagination .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
}

.rrreviews-pagination .page-numbers.current {
  background-color: #0073aa;
  color: white;
  border-color: #0073aa;
}

.rrreviews-pagination .page-numbers:hover:not(.current) {
  background-color: #f1f1f1;
}

/* Responsive Styles */
@media (max-width: 1000px) {
  .rrreviews-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 12px;
  }
}

@media (max-width: 700px) {
  .rrreviews-list {
    grid-template-columns: 1fr;
    gap: 12px 0;
    max-width: 99vw;
    padding: 0 2vw;
  }
  
  .rrreview {
    min-height: 0;
    padding: 12px 6vw 12px 4vw;
    flex-direction: column;
    gap: 12px;
  }
  
  .rrreview-photos img,
  .rrreview-img-placeholder img {
    width: 65px;
    height: 65px;
  }
}

@media (max-width: 600px) {
  .rrreviews-form-wrap {
    max-width: 97vw;
    padding: 1em 0.5em;
  }
  
  .rr-custom-file-label {
    font-size: 0.97em;
    padding: 0.8em 0.7em;
  }
}