/* Price Reviews section + write-review modal */

.mp-reviews-section {
  scroll-margin-top: 80px;
}

.reviews-stars-display {
  display: inline-flex;
  gap: 2px;
  font-size: 1.125rem;
  line-height: 1;
}

.reviews-star {
  color: #e5e7eb;
}

.reviews-star--full,
.reviews-star--half {
  color: #f59e0b;
}

.reviews-star--half {
  opacity: 0.55;
}

.reviews-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.reviews-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  background: #6366f1;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.reviews-write-btn:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.34);
}

.reviews-empty-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  font-style: italic;
}

.review-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}

body.review-modal-open {
  overflow: hidden;
}

.review-modal[hidden] {
  display: none !important;
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.review-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.review-modal__panel {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  padding: 28px 24px 24px;
}

.review-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.review-modal__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.review-modal__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.review-modal__sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.review-form__field {
  margin-bottom: 16px;
}

.review-form__field label,
.review-form__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.review-form__field input,
.review-form__field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.review-form__field input:focus,
.review-form__field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.review-form__field textarea {
  resize: vertical;
  min-height: 110px;
}

.review-form__hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.review-star-picker {
  display: flex;
  gap: 6px;
}

.review-star-picker__btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.review-star-picker__btn.is-active {
  color: #f59e0b;
  border-color: #fde68a;
  background: #fffbeb;
}

.review-star-picker__btn:hover {
  border-color: #fcd34d;
  color: #f59e0b;
}

.review-form__error {
  margin: 0 0 12px;
  font-size: 13px;
  color: #dc2626;
}

.review-form__error[hidden] {
  display: none !important;
}

.review-form__submit {
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: #6366f1;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.review-form__submit:hover:not(:disabled) {
  background: #4f46e5;
}

.review-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.review-modal__success {
  text-align: center;
  padding: 12px 0 4px;
}

.review-modal__success[hidden] {
  display: none !important;
}

.review-modal__success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-modal__success p {
  margin: 0 0 20px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .review-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-date {
    margin-left: 0;
  }

  .review-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .review-modal__panel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
