/* reviews.css */

/* ── Modal overlay ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  /* Dark, mostly-opaque overlay so the page behind is obscured */
  background: rgba(30, 20, 40, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 1000;
  /* No backdrop-filter – keeps the modal crisp and fully legible */
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Modal container ─────────────────────────────────────────── */
.modal-container {
  /* Solid white – never translucent */
  background: #ffffff;
  border-radius: 16px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
}

/* ── Close button ────────────────────────────────────────────── */
.modal-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--color-grape);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close-btn:hover {
  color: var(--color-indigo);
}

/* ── Modal header ────────────────────────────────────────────── */
.modal-header h3 {
  font-family: var(--font-display);
  color: var(--color-indigo);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-almond);
}

/* ── Form layout ─────────────────────────────────────────────── */
.modal-body form {
  display: grid;
  gap: 0.9rem;
}

.modal-body label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-indigo);
  margin-bottom: 0.2rem;
  display: block;
}

.modal-body input,
.modal-body textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--color-almond);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-indigo);
  background: #faf8f7;
  transition: border-color 0.2s;
}

.modal-body input:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--color-grape);
}

.required {
  color: var(--color-almond);
  margin-left: 2px;
}

/* ── Star rating ─────────────────────────────────────────────── */
.star-rating {
  font-size: 2.2rem;
  cursor: pointer;
  user-select: none;
  color: var(--color-almond);
  letter-spacing: 0.1rem;
}
.star-rating .star {
  margin-right: 0.15rem;
  transition: color 0.15s;
}
.star-rating .star:hover,
.star-rating .star.active {
  color: #c9933c;
}

/* ── Success message ─────────────────────────────────────────── */
#review-success {
  background: #eef7ee;
  border: 1px solid #a8d5a2;
  color: #2e6b2e;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.95rem;
}

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── "Leave a review" trigger button — below grid, centred ───── */
.review-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
