/* ============================================================
   BELIM – Customer Review Page Stylesheet
   Premium luxury elements, multi-step progress bar, custom choice cards
   ============================================================ */

/* ---------- Hero / Header Space ---------- */
.review-hero {
  padding-top: calc(var(--navbar-height, 80px) + 60px);
  padding-bottom: 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(232, 221, 203, 0.4) 0%, rgba(245, 240, 230, 0) 100%);
}

.review-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--espresso);
  margin-bottom: 12px;
}

.review-hero__title span {
  color: var(--gold);
  font-family: var(--font-heading);
  font-style: italic;
}

.review-hero__subtitle {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  color: var(--espresso-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Progress Tracker ---------- */
.progress-tracker {
  margin-bottom: 40px;
  position: relative;
  width: 100%;
}

.progress-bar-container {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--beige);
  z-index: 1;
  border-radius: 4px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 4px;
  transition: width var(--transition-smooth);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  width: 100%;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background-color: var(--cream-light);
  border: 2px solid var(--beige-dark);
  color: var(--espresso-light);
  font-family: var(--font-body);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
  font-size: 0.95rem;
  box-shadow: var(--shadow-subtle);
}

.step-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--espresso-light);
  opacity: 0.7;
  transition: all var(--transition-smooth);
}

/* Progress Step Active & Completed States */
.progress-step.active .step-num {
  background-color: var(--white);
  border-color: var(--gold);
  color: var(--gold-dark);
  box-shadow: var(--shadow-gold);
  transform: scale(1.1);
}

.progress-step.active .step-label {
  color: var(--espresso);
  opacity: 1;
  font-weight: 700;
}

.progress-step.completed .step-num {
  background-color: var(--gold);
  border-color: var(--gold-dark);
  color: var(--white);
}

.progress-step.completed .step-label {
  color: var(--gold-dark);
  opacity: 0.9;
}

/* ---------- Review Card Structure ---------- */
.review-section {
  padding: 10px 0 80px;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(197, 165, 114, 0.15);
  box-shadow: var(--shadow-card);
  padding: clamp(25px, 5vw, 50px);
  position: relative;
  overflow: hidden;
  transition: min-height var(--transition-smooth);
}

/* Luxury border-top stripe */
.review-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold-dark));
}

/* Form Steps Panes */
.form-step-pane {
  display: none;
  animation: fadeIn 0.5s ease both;
}

.form-step-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-pane__title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--espresso);
  margin-bottom: 8px;
}

.step-pane__title span {
  color: var(--gold);
  font-family: var(--font-heading);
  font-style: italic;
}

.step-pane__desc {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: var(--espresso-light);
  margin-bottom: 32px;
  opacity: 0.9;
}

/* ---------- Form Fields ---------- */
.review-form__group {
  margin-bottom: 32px;
}

.review-form__group:last-of-type {
  margin-bottom: 24px;
}

.review-form__label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.review-form__label span {
  color: var(--gold-dark);
  font-weight: 500;
}

.review-form__helper {
  font-size: 0.8rem;
  color: var(--espresso-light);
  opacity: 0.8;
  margin-top: -6px;
  margin-bottom: 16px;
}

/* Input Fields */
.review-input,
.review-textarea {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--espresso);
  background-color: var(--cream-light);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
}

.review-input:focus,
.review-textarea:focus {
  border-color: var(--gold);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(197, 165, 114, 0.15);
}

.review-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

/* Error states */
.review-form__group.has-error .review-input,
.review-form__group.has-error .review-textarea,
.review-form__group.has-error .choice-grid {
  border-color: #d9534f;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}

.review-form__group.has-error .review-input {
  border: 1.5px solid #d9534f;
}

.error-msg {
  display: none;
  font-size: 0.78rem;
  color: #d9534f;
  margin-top: 6px;
  font-weight: 500;
  animation: fadeIn 0.3s ease both;
}

.review-form__group.has-error .error-msg {
  display: block;
}

/* ---------- Custom Choice Cards ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.choice-grid--half {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 400px;
}

.choice-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  background-color: var(--cream-light);
  border: 1.5px solid var(--beige);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-align: center;
  user-select: none;
}

/* Hide native checkbox/radio */
.choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.choice-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
  transition: transform var(--transition-spring);
}

.choice-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--espresso-light);
  line-height: 1.2;
}

/* Choice card Hover */
.choice-card:hover {
  background-color: var(--white);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.choice-card:hover .choice-icon {
  transform: scale(1.18) rotate(5deg);
}

/* Choice card Checked State */
.choice-card:has(input:checked),
.choice-card.selected {
  background-color: var(--espresso);
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.choice-card:has(input:checked) .choice-title,
.choice-card.selected .choice-title {
  color: var(--cream-light);
}

.choice-card:has(input:checked) .choice-icon,
.choice-card.selected .choice-icon {
  transform: scale(1.22);
}

/* Visual active checkmark */
.choice-card::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-round);
  background-color: var(--gold);
  color: var(--white);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-spring);
  font-weight: bold;
}

.choice-card:has(input:checked)::after,
.choice-card.selected::after {
  opacity: 1;
  transform: scale(1);
}

/* Choice card focus ring (Accessibility) */
.choice-card:focus-within {
  box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.4);
}

/* ---------- Responsive break for Choice Cards ---------- */
@media (max-width: 768px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .choice-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .choice-grid--three {
    grid-template-columns: 1fr;
  }
  .choice-card {
    padding: 12px 6px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 6px;
  }
  .choice-icon {
    margin-bottom: 0;
    font-size: 1.25rem;
  }
  .choice-title {
    font-size: 0.75rem;
    text-align: left;
  }
  .choice-grid--half {
    grid-template-columns: 1fr;
  }
}

/* ---------- Step Nav Buttons ---------- */
.step-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  gap: 16px;
}

.step-nav-buttons .btn {
  min-width: 160px;
}

@media (max-width: 480px) {
  .step-nav-buttons {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .step-nav-buttons .btn {
    width: 100%;
  }
}

/* ---------- Submit Button Loading state ---------- */
.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-round);
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

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

.submit-btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.submit-btn.loading .btn-loader {
  display: inline-block;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -8px;
  margin-top: -8px;
}

/* ---------- Success Card Styles ---------- */
.review-success-card {
  display: none;
  text-align: center;
  padding: 60px 40px;
  animation: fadeIn 0.6s ease both;
}

.success-illustration {
  width: 110px;
  height: 110px;
  margin: 0 auto 30px;
  position: relative;
}

.success-cup-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: dash 2.5s ease-in-out infinite alternate;
}

.success-steam-path {
  animation: steamRise 2s ease-in-out infinite;
  transform-origin: bottom center;
  transform-box: fill-box;
}

.success-checkmark {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background-color: var(--gold);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(197, 165, 114, 0.4);
  animation: popCheckmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

@keyframes dash {
  from { stroke-dashoffset: 20; }
  to { stroke-dashoffset: 0; }
}

@keyframes steamRise {
  0% {
    opacity: 0;
    transform: translateY(2px);
  }
  40% {
    opacity: 0.8;
    transform: translateY(-4px);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
}

@keyframes popCheckmark {
  from {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.review-success-card__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--espresso);
  margin-bottom: 16px;
}

.review-success-card__title span {
  color: var(--gold);
  font-family: var(--font-heading);
  font-style: italic;
}

.review-success-card__text {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  color: var(--espresso-light);
  max-width: 550px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.success-ctas {
  display: flex;
  justify-content: center;
  gap: 20px;
}

@media (max-width: 520px) {
  .success-ctas {
    flex-direction: column;
    gap: 12px;
  }
  .success-ctas .btn {
    width: 100%;
  }
}

/* ---------- Tag Pills for review step 3 ---------- */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
  margin-top: 10px;
}

.tag-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--espresso-light);
  background-color: var(--cream-light);
  border: 1.5px solid var(--beige);
  border-radius: 40px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-smooth);
}

.tag-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tag-pill:hover {
  background-color: var(--beige);
  border-color: var(--beige-dark);
  transform: translateY(-1px);
}

.tag-pill.selected,
.tag-pill:has(input:checked) {
  background-color: var(--espresso);
  border-color: var(--gold);
  color: var(--cream-light);
  box-shadow: var(--shadow-subtle);
}
