/* Onboard Buddy brand system — extracted from docs/OB_BRAND_GUIDELINE_v1.html */

:root {
  --orange: #F7931E;
  --orange-light: #FFB04F;
  --orange-soft: #FFE5C7;
  --orange-dark: #D87A0A;
  --navy: #1B3A5C;
  --navy-light: #2E5A85;
  --navy-dark: #0F2438;
  --blue: #3B82E8;
  --teal: #5AC8FA;
  --teal-soft: #CEECFA;
  --cream: #FFF9F2;
  --paper: #FFFDFA;
  --gray: #8E8E93;
  --gray-light: #C7C7CC;
  --gray-soft: #F5F5F7;
  --gray-soft-2: #EBEBEF;
  --green: #34C759;
  --red: #FF3B30;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-soft: 0 8px 32px rgba(27, 58, 92, 0.06);
  --shadow-pop: 0 12px 40px rgba(247, 147, 30, 0.18);
  --shadow-focus: 0 0 0 4px rgba(247, 147, 30, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: white;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--navy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; border: 0; }

/* LAYOUT — mobile-first centered column matching Calendly pattern */
.page {
  min-height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 48px 20px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.page-header img {
  height: 128px;
  width: auto;
}

@media (max-width: 600px) {
  .page-header { padding: 32px 20px 24px; }
  .page-header img { height: 104px; }
}

/* SESSION BANNER — date-led pill shown on signin/quiz pages so the teacher
   never mixes up this week's session with last week's. */
.session-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 20px 24px;
  padding: 14px 22px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  border-radius: 18px;
  font-family: 'Inter', sans-serif;
  max-width: 560px;
  align-self: center;
  text-align: center;
  line-height: 1.35;
}

.session-banner[hidden] { display: none !important; }

.session-banner-date {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: var(--navy);
}

.session-banner-topic {
  font-weight: 600;
  font-size: 13px;
  opacity: 0.9;
  margin-top: 2px;
}

.session-banner-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 2px;
}

.page-back {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--navy-light);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.page-back:hover { background: var(--gray-soft); }
.page-back[hidden] { display: none !important; }

/* PROGRESS BAR */
.progress {
  height: 4px;
  background: var(--gray-soft-2);
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 20px 28px;
  max-width: 720px;
  width: calc(100% - 40px);
  align-self: center;
}

.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  width: 0%;
  transition: width 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

/* MAIN STEP CONTAINER */
.step-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 8px 20px 40px;
}

.step {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
}

/* CRITICAL: display:flex on .step overrides the [hidden] attribute silently,
   which is what caused every step to render at once. Force hide with !important
   any time the step is marked hidden. Pair display rules with explicit
   [hidden] handling for every class that uses a non-default display value. */
.step[hidden] { display: none !important; }

.step-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.step-question {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.step-helper {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--navy-light);
  line-height: 1.55;
  margin-bottom: 28px;
}

/* INPUTS — dropdowns, text, textarea */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.field-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  letter-spacing: 0.2px;
}

.input,
.select,
.textarea {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--navy);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-soft-2);
  background: white;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%231B3A5C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--orange);
  box-shadow: var(--shadow-focus);
}

.textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.55;
}

/* AUTOCOMPLETE — type-ahead filter for Center and Name fields.
   Mobile-first, full-width. Uses the brand's orange-soft as the active bg
   and a left border to show the active row (keyboard or hover). */
.autocomplete {
  position: relative;
  width: 100%;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--gray-soft-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  z-index: 20;
  padding: 6px;
  animation: autocomplete-in 0.16s cubic-bezier(0.33, 1, 0.68, 1);
}

.autocomplete-list[hidden] { display: none !important; }

@keyframes autocomplete-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.autocomplete-item {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--navy);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.1s ease, border-color 0.1s ease;
  font-weight: 500;
}

.autocomplete-item:hover,
.autocomplete-item.is-active {
  background: var(--orange-soft);
  border-left-color: var(--orange);
}

.autocomplete-empty {
  padding: 16px 14px;
  font-size: 14px;
  color: var(--gray);
  text-align: center;
  font-style: italic;
}

/* RADIO OPTIONS — single-column stack per Calendly UX */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-soft-2);
  background: white;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  font-size: 16px;
  color: var(--navy);
  font-weight: 500;
}

.option:hover {
  border-color: var(--orange-light);
  background: var(--paper);
}

.option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option .dot {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-light);
  background: white;
  position: relative;
  transition: border-color 0.15s ease;
}

.option .dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
}

.option.is-selected {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: var(--shadow-focus);
}

.option.is-selected .dot { border-color: var(--orange); }
.option.is-selected .dot::after { transform: translate(-50%, -50%) scale(1); }

/* CHECKBOX variant for select_all questions — same container, different mark. */
.option .check-box {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
  border: 2px solid var(--gray-light);
  background: white;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option .check-box::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 6px;
  height: 11px;
  border-right: 2.5px solid white;
  border-bottom: 2.5px solid white;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.15s ease;
}

.option.option-check.is-selected .check-box {
  background: var(--orange);
  border-color: var(--orange);
}
.option.option-check.is-selected .check-box::after { transform: rotate(45deg) scale(1); }

/* SHORT-ANSWER wrap — reuses the .textarea styling from the inputs section */
.short-answer-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* SCALE PILLS — horizontal 1..5 buttons for Likert-style questions */
.scale-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
}

.scale-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.scale-pill {
  background: white;
  border: 1.5px solid var(--gray-soft-2);
  color: var(--navy);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  border-radius: var(--radius-md);
  padding: 22px 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  min-height: 68px;
}

.scale-pill:hover {
  border-color: var(--orange-light);
  background: var(--paper);
}

.scale-pill.is-selected {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(247, 147, 30, 0.3);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 4px;
}

@media (max-width: 480px) {
  .scale-pill { font-size: 18px; padding: 16px 0; min-height: 56px; }
}

/* CONFIDENCE SLIDER */
.slider-wrap {
  background: var(--paper);
  border: 1.5px solid var(--gray-soft-2);
  border-radius: var(--radius-md);
  padding: 24px 20px 20px;
  margin-bottom: 12px;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 14px;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--gray-soft-2);
  border-radius: 999px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  background: var(--orange);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(247, 147, 30, 0.4);
}

.slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: var(--orange);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(247, 147, 30, 0.4);
}

.slider-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 42px;
  color: var(--orange);
  text-align: center;
  line-height: 1;
  margin-bottom: 6px;
}

/* PRIMARY CTA — orange, bottom, full width on mobile, left-aligned row on desktop */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 28px;
  border-radius: 999px;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 52px;
}

.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 6px 18px rgba(247, 147, 30, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(247, 147, 30, 0.38);
}

.btn-primary:disabled {
  background: var(--gray-light);
  color: white;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--navy-light);
  padding: 16px 20px;
}

.btn-ghost:hover {
  background: var(--gray-soft);
}

@media (max-width: 600px) {
  .actions { flex-direction: column-reverse; }
  .btn { width: 100%; }
}

/* TRANSITIONS between steps */
.step.is-entering { animation: slide-in 0.35s cubic-bezier(0.33, 1, 0.68, 1); }
.step.is-exiting { animation: slide-out 0.25s ease-in forwards; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

/* THANK YOU / SUCCESS PAGE */
.success {
  text-align: center;
  padding: 40px 20px 60px;
  max-width: 560px;
  margin: 0 auto;
}

.success-mascot {
  width: 180px;
  height: auto;
  margin: 0 auto 28px;
  filter: drop-shadow(0 12px 24px rgba(247, 147, 30, 0.18));
}

.success h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--navy);
  letter-spacing: -1px;
  margin-bottom: 14px;
  line-height: 1.15;
}

.success p {
  font-size: 16px;
  color: var(--navy-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin: 20px 0 12px;
}

.success-footnote {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 28px;
}

/* ERROR / BLOCKED STATES */
.notice {
  background: var(--cream);
  border: 1px solid var(--orange-soft);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
}

.notice-strong {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  color: var(--navy-dark);
}

.error-inline {
  color: var(--red);
  font-size: 13px;
  margin-top: 6px;
}

/* FOOTER / LEGAL */
.page-footer {
  text-align: center;
  padding: 24px 20px 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* LOADING SPINNER */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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