/**
 * Oriya Reviews - Styles
 * Responsive design: Mobile (up to 1023px) and Desktop (from 1024px)
 * Brand Colors: #662121, #0F2E3B, #000000
 * Font: Heebo
 */

/* =====================================================
   GENERAL STYLES
   ===================================================== */

.oriya-reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Heebo', sans-serif;
  direction: rtl;
}

/* Desktop two-column layout */
@media (min-width: 1024px) {
  .oriya-reviews-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
  }

  .oriya-review-form-wrapper {
    flex: 0 0 380px;
    order: 2;
    position: sticky;
    top: 20px;
  }

  .oriya-reviews-display {
    flex: 1;
    order: 1;
    margin-top: 0;
  }
}

/* =====================================================
   REVIEW FORM
   ===================================================== */

.oriya-review-form-wrapper {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.oriya-review-form-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 25px 0;
  color: #000000;
  font-family: 'Heebo', sans-serif;
}

h4.oriya-review-form-subtitle {
  font-size: 14px;
}

.oriya-review-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oriya-form-field {
  display: flex;
  flex-direction: column;
}

.oriya-form-field label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #0f2e3b;
  font-size: 15px;
  font-family: 'Heebo', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oriya-form-field .required {
  color: #662121;
}

/* Product Price Display */
.oriya-product-price-wrapper {
  text-align: center;
  margin: 15px 0;
  font-family: 'Heebo', sans-serif;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.oriya-regular-price-range {
  text-decoration: line-through;
  color: #9b7171;
  font-size: 14px;
  line-height: 1.2;
}

.oriya-sale-price-range {
  font-weight: 700;
  font-size: 16px;
  color: #0f2e3b;
  line-height: 1.2;
}

.oriya-product-price-wrapper:not(.on-sale) .oriya-regular-price-range {
  display: none;
}

/* Tooltip */
.oriya-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.oriya-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f2e3b;
  color: white;
  font-size: 12px;
  cursor: help;
  font-weight: bold;
}

.oriya-tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  padding: 10px 15px;
  background: #0f2e3b;
  color: white;
  font-size: 13px;
  font-weight: 400;
  border-radius: 8px;
  width: 280px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition:
    opacity 0.3s,
    visibility 0.3s;
  z-index: 1000;
  line-height: 1.5;
}

.oriya-tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 10px;
  border: 6px solid transparent;
  border-top-color: #0f2e3b;
}

.oriya-tooltip:hover .oriya-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.oriya-form-field input[type='text'],
.oriya-form-field input[type='email'],
.oriya-form-field textarea {
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 15px;
  font-family: 'Heebo', sans-serif;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.oriya-form-field input[type='text']:focus,
.oriya-form-field input[type='email']:focus,
.oriya-form-field textarea:focus {
  outline: none;
  border-color: #662121;
  box-shadow: 0 0 0 3px rgba(102, 33, 33, 0.08);
}

.oriya-form-field textarea {
  resize: vertical;
  min-height: 100px;
  border-radius: 25px;
}

/* OTP Field */
.oriya-otp-field input[type='text'] {
  text-align: center;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 500;
}

.oriya-otp-status {
  margin-top: 8px;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 25px;
  display: none;
  font-family: 'Heebo', sans-serif;
}

.oriya-otp-status.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.oriya-otp-status.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Star Rating */
.oriya-form-field:has(.oriya-star-rating) {
  align-items: center;
}

.oriya-form-field:has(.oriya-star-rating) > label {
  text-align: center;
  justify-content: center;
}

.oriya-star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 12px;
  font-size: 58px;
}

.oriya-star-rating input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.oriya-star-rating input[type='radio']:focus + label {
  outline: 3px solid #662121;
  outline-offset: 4px;
  border-radius: 4px;
}

.oriya-star-rating label {
  cursor: pointer;
  color: #ddd;
  transition: all 0.2s;
  margin-bottom: 0;
  display: inline-block;
  width: 40px;
  height: 40px;
  position: relative;
}

.oriya-star-rating label::before {
  content: '';
  display: inline-block;
  width: 100%;
  height: 100%;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none'%3E%3Cg clip-path='url(%23SVGwDJxaeOQ)'%3E%3Cpath fill='%23000' d='M21.95 10.605a1.75 1.75 0 0 1-.5.86l-3.3 3.22a.4.4 0 0 0-.08.12a.3.3 0 0 0 0 .14l.78 4.56c.065.336.03.684-.1 1a1.65 1.65 0 0 1-.61.77a1.83 1.83 0 0 1-.92.35h-.13a1.8 1.8 0 0 1-.84-.21l-4.1-2.14a.28.28 0 0 0-.28 0l-4.1 2.15a1.9 1.9 0 0 1-1 .21a1.83 1.83 0 0 1-.93-.35a1.75 1.75 0 0 1-.61-.78a1.8 1.8 0 0 1-.1-1l.78-4.55a.23.23 0 0 0 0-.14a.4.4 0 0 0-.07-.12l-3.3-3.24a1.8 1.8 0 0 1-.49-.85a1.75 1.75 0 0 1 0-1a1.81 1.81 0 0 1 1.49-1.21l4.5-.66a.18.18 0 0 0 .12-.05a.3.3 0 0 0 .09-.11l2.1-4.18c.143-.3.369-.553.65-.73a1.79 1.79 0 0 1 2.57.74l2.08 4.16a.4.4 0 0 0 .1.12a.2.2 0 0 0 .13.05l4.57.66c.332.05.644.192.9.41c.251.217.441.496.55.81c.106.32.124.662.05.99'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='SVGwDJxaeOQ'%3E%3Cpath fill='%23fff' d='M2 2.395h20v19.21H2z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.oriya-star-rating label:hover,
.oriya-star-rating label:hover ~ label {
  color: #662121;
  transform: scale(1.1);
}

.oriya-star-rating input[type='radio']:checked ~ label {
  color: #662121;
}

/* Image Upload */
.oriya-form-field input[type='file'] {
  padding: 15px 20px;
  border: 2px dashed #e0e0e0;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Heebo', sans-serif;
  transition: border-color 0.3s;
}

.oriya-form-field input[type='file']:hover {
  border-color: #662121;
}

.oriya-image-preview {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.oriya-image-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  transition: all 0.3s;
}

.oriya-image-preview-item:hover {
  border-color: #662121;
  transform: scale(1.02);
}

.oriya-image-preview-item img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

button.oriya-image-preview-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-weight: 300;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0.9;
}

button.oriya-image-preview-remove:hover {
  background: #662121;
  transform: scale(1.15);
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.oriya-image-preview-item:hover .oriya-image-preview-remove {
  opacity: 1;
}

/* Submit Button */
button.oriya-btn-submit {
  background: #662121;
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Heebo', sans-serif;
}

button.oriya-btn-submit:hover {
  background: #0f2e3b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 33, 33, 0.3);
}

button.oriya-btn-submit:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Form Messages */
.oriya-form-messages {
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  display: none;
  font-family: 'Heebo', sans-serif;
}

.oriya-form-messages.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.oriya-form-messages.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* =====================================================
   REVIEWS DISPLAY
   ===================================================== */

.oriya-reviews-display {
  margin-top: 40px;
}

.oriya-reviews-display:has(.oriya-no-reviews) {
  display: none;
}

.oriya-reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.oriya-reviews-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: #000000;
  font-family: 'Heebo', sans-serif;
}

.oriya-reviews-filters {
  display: flex;
  gap: 15px;
}

.oriya-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  font-family: 'Heebo', sans-serif;
  color: #0f2e3b;
}

.oriya-filter-checkbox input[type='checkbox'] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #662121;
}

/* Reviews List */
.oriya-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.oriya-no-reviews {
  text-align: center;
  padding: 40px 20px;
  color: #777;
  font-size: 16px;
  font-family: 'Heebo', sans-serif;
}

/* Single Review */
.oriya-review-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  padding: 25px 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s;
}

.oriya-review-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.oriya-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 15px;
}

.oriya-review-author {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.oriya-review-name {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  font-family: 'Heebo', sans-serif;
}

.oriya-review-verified {
  font-size: 13px;
  color: #0f2e3b;
  font-weight: 500;
  font-family: 'Heebo', sans-serif;
}

.oriya-review-rating {
  flex-shrink: 0;
}

.oriya-stars {
  display: flex;
  gap: 3px;
  font-size: 20px;
}

.oriya-star.filled,
.oriya-star.empty {
  display: inline-block;
  width: 20px;
  height: 20px;
  position: relative;
}

.oriya-star.filled::before,
.oriya-star.empty::before {
  content: '';
  display: inline-block;
  width: 100%;
  height: 100%;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none'%3E%3Cg clip-path='url(%23SVGwDJxaeOQ)'%3E%3Cpath fill='%23000' d='M21.95 10.605a1.75 1.75 0 0 1-.5.86l-3.3 3.22a.4.4 0 0 0-.08.12a.3.3 0 0 0 0 .14l.78 4.56c.065.336.03.684-.1 1a1.65 1.65 0 0 1-.61.77a1.83 1.83 0 0 1-.92.35h-.13a1.8 1.8 0 0 1-.84-.21l-4.1-2.14a.28.28 0 0 0-.28 0l-4.1 2.15a1.9 1.9 0 0 1-1 .21a1.83 1.83 0 0 1-.93-.35a1.75 1.75 0 0 1-.61-.78a1.8 1.8 0 0 1-.1-1l.78-4.55a.23.23 0 0 0 0-.14a.4.4 0 0 0-.07-.12l-3.3-3.24a1.8 1.8 0 0 1-.49-.85a1.75 1.75 0 0 1 0-1a1.81 1.81 0 0 1 1.49-1.21l4.5-.66a.18.18 0 0 0 .12-.05a.3.3 0 0 0 .09-.11l2.1-4.18c.143-.3.369-.553.65-.73a1.79 1.79 0 0 1 2.57.74l2.08 4.16a.4.4 0 0 0 .1.12a.2.2 0 0 0 .13.05l4.57.66c.332.05.644.192.9.41c.251.217.441.496.55.81c.106.32.124.662.05.99'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='SVGwDJxaeOQ'%3E%3Cpath fill='%23fff' d='M2 2.395h20v19.21H2z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/g%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.oriya-star.filled::before {
  color: #662121;
}

.oriya-star.empty::before {
  color: #ddd;
}

/* =====================================================
   REVIEWS COUNT (PRODUCT CARD)
   ===================================================== */
.oriya-reviews-count-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fdf2f2;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Heebo', sans-serif;
  margin: 5px 0;
  cursor: pointer;
  transition: background-color 0.3s;
  position: relative;
}

.oriya-reviews-count-wrapper:hover {
  background: #fce8e8;
}

/* Styled Tooltip */
.oriya-reviews-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #0f2e3b;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.oriya-reviews-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #0f2e3b transparent transparent transparent;
}

.oriya-reviews-count-wrapper:hover .oriya-reviews-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

.oriya-reviews-count-wrapper .oriya-star.filled {
  width: 20px;
  height: 20px;
}

.oriya-reviews-count-wrapper .oriya-count-text {
  font-size: 13px;
  font-weight: 600;
  color: #662121;
  line-height: 2;
}

.oriya-review-content {
  color: #555;
  line-height: 1.6;
  font-size: 15px;
  font-family: 'Heebo', sans-serif;
}

.oriya-review-content p {
  margin: 0 0 10px 0;
}

.oriya-review-content p:last-child {
  margin-bottom: 0;
}

/* Review Images */
.oriya-review-images {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.oriya-review-image-link {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.oriya-review-image-link:hover {
  transform: scale(1.08);
  border-color: #662121;
  box-shadow: 0 6px 16px rgba(102, 33, 33, 0.2);
}

.oriya-review-image-link img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.3s;
}

.oriya-review-image-link:hover img {
  transform: scale(1.05);
}

.oriya-review-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.oriya-review-date {
  font-size: 13px;
  color: #999;
  font-family: 'Heebo', sans-serif;
}

/* Load More Button */
.oriya-reviews-load-more {
  margin-top: 30px;
  text-align: center;
}

.oriya-btn-load-more {
  background: #0f2e3b;
  color: white;
  border: none;
  padding: 16px 50px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Heebo', sans-serif;
}

.oriya-btn-load-more:hover {
  background: #662121;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 46, 59, 0.3);
}

.oriya-btn-load-more:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.oriya-btn-load-more.loading::after {
  content: '...';
  animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
  0%,
  20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%,
  100% {
    content: '...';
  }
}

/* =====================================================
   RESPONSIVE STYLES - MOBILE (up to 1023px)
   ===================================================== */

@media (max-width: 1023px) {
  .oriya-reviews-container {
    padding: 8px;
  }

  .oriya-review-form-wrapper {
    padding: 20px 12px;
    margin-bottom: 30px;
    border-radius: 12px;
  }

  .oriya-review-form-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .oriya-form-field {
    gap: 0;
  }

  .oriya-email-otp-wrapper {
    flex-direction: column;
  }

  .oriya-email-otp-wrapper input[type='email'] {
    width: 100%;
  }
  .oriya-form-field input[type='text'],
  .oriya-form-field input[type='email'],
  .oriya-form-field textarea {
    padding: 8px 12px;
  }

  .oriya-btn-otp {
    width: 100%;
    padding: 14px 20px;
  }

  .oriya-otp-wrapper {
    flex-direction: column;
  }

  .oriya-otp-wrapper input[type='text'] {
    max-width: 100%;
  }
  .oriya-form-field textarea {
    border-radius: 12px;
  }

  .oriya-btn-verify-otp {
    width: 100%;
    padding: 14px 20px;
  }

  .oriya-star-rating {
    font-size: 50px;
    gap: 10px;
  }

  .oriya-star-rating label {
    width: 32px;
    height: 32px;
  }

  button.oriya-btn-submit {
    width: 100%;
    padding: 8px 20px;
  }

  .oriya-reviews-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .oriya-reviews-title {
    font-size: 20px;
  }

  .oriya-review-item {
    padding: 20px;
    border-radius: 12px;
  }

  .oriya-review-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .oriya-review-name {
    font-size: 16px;
  }

  .oriya-stars {
    font-size: 18px;
  }

  .oriya-review-content {
    font-size: 14px;
  }

  .oriya-review-image-link {
    width: calc(20% - 7px);
    height: 56px;
    border-radius: 4px;
  }

  .oriya-btn-load-more {
    width: 100%;
    padding: 14px 30px;
  }
}

/* =====================================================
   RESPONSIVE STYLES - DESKTOP (from 1024px)
   ===================================================== */

@media (min-width: 1024px) {
  .oriya-reviews-container {
    padding: 30px;
  }

  .oriya-review-form-wrapper {
    padding: 20px;
  }

  .oriya-review-item {
    padding: 30px;
    border-radius: 12px;
  }

  .oriya-review-images {
    gap: 15px;
  }

  .oriya-review-image-link {
    width: 150px;
    height: 150px;
  }
}

/* =====================================================
   LOADING STATE
   ===================================================== */

.oriya-loading {
  opacity: 0.6;
  pointer-events: none;
}

.oriya-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
