/* Feedback wizard — purple portal theme, scoped under .feedback-page */

.feedback-page {
  --fb-good: #159a57;
  --fb-good-soft: #e6f6ed;
  --fb-warn: #d9901a;
  --fb-warn-soft: #fbf1da;
}

.feedback-page .feedback-wrap {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

.feedback-page .fb-draft-status {
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 8px;
  min-height: 18px;
  transition: opacity 0.2s;
}

.feedback-page .fb-draft-status.is-visible {
  color: var(--success);
}

/* hero */
.feedback-page .fhero {
  text-align: center;
  margin-bottom: 22px;
}

.feedback-page .fhero .ic {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid;
  place-items: center;
  color: #fff;
  margin: 0 auto 12px;
  box-shadow: 0 8px 20px rgba(77, 62, 119, 0.3);
}

.feedback-page .fhero .ic svg {
  width: 26px;
  height: 26px;
}

.feedback-page .fhero h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.feedback-page .fhero p {
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
  margin-top: 4px;
}

/* stepper */
.feedback-page .stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 6px;
}

.feedback-page .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 120px;
  position: relative;
  cursor: pointer;
}

.feedback-page .step .s-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-3);
  transition: all 0.2s;
  z-index: 1;
}

.feedback-page .step .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-align: center;
  transition: color 0.2s;
}

.feedback-page .step.active .s-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.feedback-page .step.active .lbl {
  color: var(--brand);
}

.feedback-page .step.done .s-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.feedback-page .step.done .lbl {
  color: var(--ink-2);
}

.feedback-page .step .s-line {
  position: absolute;
  top: 17px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  background: var(--line);
}

.feedback-page .step.done .s-line {
  background: var(--success);
}

.feedback-page .step:last-child .s-line {
  display: none;
}

.feedback-page .pbar {
  height: 5px;
  background: var(--line-2, #f0eee9);
  border-radius: 99px;
  overflow: hidden;
  margin: 16px 0 22px;
}

.feedback-page .pbar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* panels */
.feedback-page .fb-panel {
  display: none;
  animation: fbFade 0.35s ease;
}

.feedback-page .fb-panel.show {
  display: block;
}

@keyframes fbFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.feedback-page .fb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 16px;
}

.feedback-page .fb-card .sh {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 4px;
}

.feedback-page .fb-card .sh .ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feedback-page .fb-card .sh .ic svg {
  width: 17px;
  height: 17px;
}

.feedback-page .fb-card .sh h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.feedback-page .fb-card .sd {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 18px;
  margin-left: 45px;
}

/* stars */
.feedback-page .stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 8px 0;
}

.feedback-page .star {
  width: 44px;
  height: 44px;
  color: var(--line);
  transition: transform 0.12s, color 0.12s;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.feedback-page .star:hover {
  transform: scale(1.15);
}

.feedback-page .star svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.feedback-page .star.on {
  color: var(--amber);
}

.feedback-page .star.on svg {
  fill: var(--amber);
  stroke: var(--amber);
}

.feedback-page .star-val {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-top: 4px;
}

/* moods */
.feedback-page .moods {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px;
}

.feedback-page .mood {
  border: 1.5px solid var(--line);
  border-radius: 15px;
  padding: 16px 8px;
  text-align: center;
  transition: all 0.16s;
  background: var(--surface);
  cursor: pointer;
}

.feedback-page .mood:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d4d2cb;
}

.feedback-page .mood .em {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
  filter: grayscale(0.3);
  transition: filter 0.16s;
}

.feedback-page .mood:hover .em,
.feedback-page .mood.on .em {
  filter: none;
}

.feedback-page .mood .ml {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}

.feedback-page .mood.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

.feedback-page .mood.on .ml {
  color: var(--brand);
}

/* sliders */
.feedback-page .slider-row {
  margin-bottom: 20px;
}

.feedback-page .slider-row:last-child {
  margin-bottom: 0;
}

.feedback-page .slider-row .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 12px;
}

.feedback-page .slider-row .top .q {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.feedback-page .slider-row .top .q small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 1px;
}

.feedback-page .slider-row .badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
  flex-shrink: 0;
}

.feedback-page .rng {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: var(--line-2, #f0eee9);
  outline: none;
  cursor: pointer;
}

.feedback-page .rng::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.12s;
}

.feedback-page .rng::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.feedback-page .rng::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.feedback-page .rng-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
  margin-top: 5px;
}

/* chip questions */
.feedback-page .grp-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-page .grp-label svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.feedback-page .grp-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2, #f0eee9);
}

.feedback-page .qrow {
  margin-bottom: 18px;
}

.feedback-page .qrow:last-child {
  margin-bottom: 0;
}

.feedback-page .qrow .q {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 9px;
  color: var(--ink);
}

.feedback-page .chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-page .chip-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-page .chip {
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
  transition: all 0.14s;
  cursor: pointer;
  display: inline-block;
}

.feedback-page .chip:hover {
  border-color: #d4d2cb;
  color: var(--ink);
}

.feedback-page .chip-input:checked + .chip,
.feedback-page .chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(77, 62, 119, 0.25);
}

.feedback-page .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* teacher accordion */
.feedback-page .teacher {
  border: 1.5px solid var(--line);
  border-radius: 15px;
  margin-bottom: 13px;
  overflow: hidden;
  transition: border-color 0.16s;
}

.feedback-page .teacher.open {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.feedback-page .t-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  cursor: pointer;
  transition: background 0.14s;
}

.feedback-page .t-head:hover {
  background: var(--surface-2);
}

.feedback-page .t-av {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.feedback-page .t-head .ti {
  flex: 1;
  min-width: 0;
}

.feedback-page .t-head .ti b {
  font-size: 14px;
  font-weight: 700;
  display: block;
  color: var(--ink);
}

.feedback-page .t-head .ti small {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.feedback-page .t-prog {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--ink-3);
  border: 1px solid var(--line);
  flex-shrink: 0;
}


.feedback-page .t-chev {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.feedback-page .teacher.open .t-chev {
  transform: rotate(180deg);
}

.feedback-page .t-chev svg {
  width: 18px;
  height: 18px;
}

.feedback-page .t-body {
  display: none;
  padding: 6px 17px 18px;
  border-top: 1px solid var(--line-2, #f0eee9);
}

.feedback-page .teacher.open .t-body {
  display: block;
}

/* rating scale */
.feedback-page .rate-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2, #f0eee9);
}

.feedback-page .rate-row:last-of-type {
  border-bottom: none;
}

.feedback-page .rate-row .rl {
  font-size: 12.5px;
  font-weight: 600;
  width: 200px;
  flex-shrink: 0;
  color: var(--ink);
}

.feedback-page .scale {
  display: flex;
  gap: 5px;
  flex: 1;
  position: relative;
}

.feedback-page .scale input[type="radio"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.feedback-page .scale label {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-2, #f0eee9);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  transition: all 0.1s;
  min-width: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin: 0;
}

.feedback-page .scale label:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.feedback-page .scale label.fill,
.feedback-page .scale input:checked + label.fill {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.feedback-page .scale label.fill-good,
.feedback-page .scale input:checked + label.fill-good {
  background: var(--fb-good);
  border-color: var(--fb-good);
  color: #fff;
}

.feedback-page .scale label.fill-warn,
.feedback-page .scale input:checked + label.fill-warn {
  background: var(--fb-warn);
  border-color: var(--fb-warn);
  color: #fff;
}

.feedback-page .rate-val {
  width: 30px;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.feedback-page .rate-val.is-good { color: var(--fb-good); }
.feedback-page .rate-val.is-warn { color: var(--fb-warn); }
.feedback-page .rate-val.is-mid { color: var(--brand); }

.feedback-page .t-prog.done {
  background: var(--fb-good-soft);
  color: var(--fb-good);
  border-color: transparent;
}

/* testimonial */
.feedback-page .testi {
  margin-top: 16px;
}

.feedback-page .testi label {
  font-size: 12.5px;
  font-weight: 700;
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.feedback-page .testi textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
  min-height: 90px;
  background: var(--surface-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.feedback-page .testi textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
  background: var(--surface);
}

.feedback-page .testi .meta {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 600;
}

.feedback-page .testi .hint {
  color: var(--ink-3);
}

.feedback-page .testi .count {
  color: var(--ink-3);
}

.feedback-page .testi .count.ok {
  color: var(--fb-good);
}

/* review */
.feedback-page .rev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feedback-page .rev {
  background: var(--surface-2);
  border: 1px solid var(--line-2, #f0eee9);
  border-radius: 13px;
  padding: 14px;
}

.feedback-page .rev small {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  display: block;
  margin-bottom: 5px;
}

.feedback-page .rev b {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.feedback-page .rev .stars-sm {
  color: var(--amber);
  font-size: 15px;
}

/* nav bar */
.feedback-page #feedback-form {
  display: flex;
  flex-direction: column;
}

.feedback-page .fb-panel.show {
  min-width: 0;
}

.feedback-page .fb-nav-bar {
  position: static;
  flex-shrink: 0;
  margin-top: 20px;
  background: rgba(246, 245, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  margin-left: -26px;
  margin-right: -26px;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.feedback-page .fb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 12px;
  transition: transform 0.14s, opacity 0.14s, box-shadow 0.14s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.feedback-page .fb-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.feedback-page .fb-btn svg {
  width: 16px;
  height: 16px;
}

.feedback-page .fb-btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.feedback-page .fb-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(77, 62, 119, 0.25);
  margin-left: auto;
}

.feedback-page .fb-btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(77, 62, 119, 0.32);
}

.feedback-page .fb-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.feedback-page .nav-note {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.feedback-page .fb-form-error {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  margin-top: 12px;
  display: none;
}

.feedback-page .fb-form-error.is-visible {
  display: block;
}

/* success screen */
.feedback-page .done-screen {
  display: none;
  text-align: center;
  padding: 50px 20px;
}

.feedback-page .done-screen.show {
  display: block;
}

.feedback-page .done-screen .big {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  display: grid;
  place-items: center;
  color: #fff;
  margin: 0 auto 18px;
  box-shadow: 0 12px 30px rgba(77, 62, 119, 0.35);
  animation: fbPop 0.5s cubic-bezier(0.2, 1.3, 0.4, 1);
}

@keyframes fbPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.feedback-page .done-screen .big svg {
  width: 40px;
  height: 40px;
  stroke-width: 2.5;
}

.feedback-page .done-screen h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}

.feedback-page .done-screen p {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  margin: 8px auto 0;
  max-width: 420px;
}

@media (max-width: 920px) {
  .feedback-page .two-col {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .feedback-page .rate-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0;
  }

  .feedback-page .rate-row .rl {
    width: 100%;
    line-height: 1.35;
  }

  .feedback-page .scale {
    flex: none;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    flex-wrap: nowrap;
    gap: 4px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .feedback-page .scale::-webkit-scrollbar {
    display: none;
  }

  .feedback-page .scale label {
    flex: 0 0 32px;
    min-width: 32px;
    height: 36px;
  }

  .feedback-page .rate-val {
    width: auto;
    text-align: right;
    align-self: flex-end;
  }

  .feedback-page #feedback-form {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    overflow-anchor: none;
  }

  .feedback-page .fb-nav-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom, 0px));
    z-index: 200;
    box-shadow: 0 -8px 24px rgba(27, 33, 48, 0.1);
  }
}

@media (max-width: 680px) {
  .feedback-page .moods {
    grid-template-columns: repeat(3, 1fr);
  }

  .feedback-page .step .lbl {
    display: none;
  }

  .feedback-page .step {
    max-width: none;
  }

  .feedback-page .rev-grid {
    grid-template-columns: 1fr;
  }

  .feedback-page .fhero h2 {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-page * {
    animation: none !important;
    transition: none !important;
  }
}
