/* ==========================================================================
   Tulos Progressive Step-by-Step Wizard Design System
   Clean White Canvas + Saffron Typography (#E8714A) + Light Blue Options (#EBF5FF)
   ========================================================================== */

:root {
  --color-saffron: #E8714A;
  --color-saffron-dark: #C45A35;
  --color-saffron-light: #FFF4EE;
  
  --bg-white: #FFFFFF;
  --bg-subtle: #FAFAFA;
  --border-light: #EBEBEB;
  
  /* Light Blue Options */
  --option-blue-bg: #EBF5FF;
  --option-blue-border: #BAE6FD;
  --option-blue-text: #0369A1;
  --option-blue-subtext: #0284C7;
  
  --text-dark: #222222;
  --text-muted: #666666;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
  background-color: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* ==========================================================================
   Top Progress Bar
   ========================================================================== */

.progress-bar-container {
  width: 100%;
  height: 4px;
  background-color: #F1F5F9;
  position: sticky;
  top: 0;
  z-index: 100;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-saffron);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Wizard Container
   ========================================================================== */

.wizard-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 36px 16px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Step Cards & Typography
   ========================================================================== */

.step-card {
  display: none;
  flex-direction: column;
  animation: stepFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card.active {
  display: flex;
}

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

.step-title {
  font-size: 20.5px;
  font-weight: 800;
  color: var(--color-saffron);
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin-bottom: 5px;
}

.step-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 18px;
}

/* ==========================================================================
   Step 1: Subjects Cloud & Custom Input
   ========================================================================== */

.options-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--option-blue-bg);
  border: 1.5px solid var(--option-blue-border);
  color: var(--option-blue-text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-pill:active {
  transform: scale(0.96);
}

.option-pill .pill-check {
  display: none;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-saffron);
}

.option-pill.selected {
  background: var(--color-saffron-light);
  border-color: var(--color-saffron);
  color: var(--color-saffron);
  font-weight: 700;
}

.option-pill.selected .pill-check {
  display: inline-block;
}

.custom-add-wrapper {
  display: flex;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1.5px dashed var(--option-blue-border);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 12px;
  margin-bottom: 28px;
}

.custom-add-wrapper:focus-within {
  background: #FFFFFF;
  border-style: solid;
  border-color: var(--color-saffron);
  box-shadow: 0 0 0 3px rgba(232, 113, 74, 0.1);
}

.custom-add-wrapper input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-dark);
  background: transparent;
}

.btn-custom-add {
  background: var(--color-saffron);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}

/* ==========================================================================
   Step 2: Tuition Mode Cards (Light Blue Options with Crisp Text)
   ========================================================================== */

.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--option-blue-bg);
  border: 2px solid var(--option-blue-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-card:active {
  transform: scale(0.98);
}

.mode-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mode-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--option-blue-text);
}

.mode-desc {
  font-size: 12.5px;
  color: var(--option-blue-subtext);
  line-height: 1.4;
}

.mode-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--option-blue-border);
  background: #FFFFFF;
  flex-shrink: 0;
  margin-left: 12px;
  position: relative;
  transition: all 0.15s ease;
}

.mode-card.selected {
  background: var(--color-saffron-light);
  border-color: var(--color-saffron);
}

.mode-card.selected .mode-title {
  color: var(--color-saffron);
}

.mode-card.selected .mode-desc {
  color: #9A3412;
}

.mode-card.selected .mode-indicator {
  border-color: var(--color-saffron);
  background: var(--color-saffron);
}

.mode-card.selected .mode-indicator::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: #FFFFFF;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   Step 3: Preferred Time & Clock Picker
   ========================================================================== */

.clock-box-interactive {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--option-blue-bg);
  border: 2px solid var(--option-blue-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.15s ease;
}

.clock-box-interactive:active {
  transform: scale(0.98);
}

.clock-info {
  display: flex;
  flex-direction: column;
}

.clock-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--option-blue-subtext);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.clock-digits {
  font-size: 24px;
  font-weight: 800;
  color: var(--option-blue-text);
  letter-spacing: -0.5px;
}

.clock-action-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-saffron);
  background: #FFFFFF;
  border: 1px solid var(--color-saffron);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.clock-native-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.presets-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.presets-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.preset-pill {
  background: var(--option-blue-bg);
  border: 1.5px solid var(--option-blue-border);
  color: var(--option-blue-text);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.preset-pill.selected {
  background: var(--color-saffron-light);
  border-color: var(--color-saffron);
  color: var(--color-saffron);
  font-weight: 700;
}

/* ==========================================================================
   Step 4: Location
   ========================================================================== */

.location-box {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.location-box input {
  flex: 1;
  min-width: 0;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
}

.location-box input:focus {
  background: #FFFFFF;
  border-color: var(--color-saffron);
  box-shadow: 0 0 0 3px rgba(232, 113, 74, 0.1);
}

.btn-gps-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--option-blue-bg);
  border: 1.5px solid var(--option-blue-border);
  color: var(--option-blue-text);
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
}

.location-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ==========================================================================
   Step 5: Notes
   ========================================================================== */

.notes-box textarea {
  width: 100%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 13.5px;
  color: var(--text-dark);
  outline: none;
  resize: none;
  margin-bottom: 28px;
}

.notes-box textarea:focus {
  background: #FFFFFF;
  border-color: var(--color-saffron);
  box-shadow: 0 0 0 3px rgba(232, 113, 74, 0.1);
}

/* ==========================================================================
   Step 6: Summary & Submission Card
   ========================================================================== */

.summary-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid #EBEBEB;
  gap: 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.summary-row:hover,
.summary-row:active {
  background: rgba(232, 113, 74, 0.05);
}

.summary-row:last-of-type {
  border-bottom: none;
}

.summary-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.summary-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  word-break: break-word;
}

.btn-edit-jump {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1.5px solid var(--color-saffron);
  color: var(--color-saffron);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-edit-jump svg {
  flex-shrink: 0;
}

.btn-edit-jump:active {
  background: var(--color-saffron-light);
  border-color: var(--color-saffron);
}

.summary-demo-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.summary-demo-notice .check-icon {
  width: 22px;
  height: 22px;
  background: #10B981;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.notice-text {
  display: flex;
  flex-direction: column;
}

.notice-text strong {
  font-size: 12.5px;
  color: #065F46;
}

.notice-text span {
  font-size: 11px;
  color: #047857;
}

/* ==========================================================================
   Navigation Buttons & CTA
   ========================================================================== */

.wizard-nav-single {
  display: flex;
  justify-content: flex-end;
}

.wizard-nav-double {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-mode-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.edit-mode-nav .btn-cancel-edit {
  flex: 0 0 auto;
  min-width: 80px;
}

.edit-mode-nav .btn-save-edit {
  flex: 1;
}

.btn-saffron-primary {
  background: var(--color-saffron);
  color: #FFFFFF;
  border: none;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(232, 113, 74, 0.25);
  transition: all 0.15s ease;
}

.btn-saffron-primary:active {
  transform: scale(0.98);
  background: var(--color-saffron-dark);
}

.btn-nav-back {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 16px;
}

.summary-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-submit-major {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
}

.btn-back-summary {
  align-self: center;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.tulos-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   Success Dialog Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1000;
}

.tulos-dialog-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dialog-icon-circle {
  width: 56px;
  height: 56px;
  background: var(--color-saffron-light);
  border-radius: 50%;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tulos-dialog-card h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.dialog-booking-id {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-saffron);
  margin-bottom: 8px;
}

.dialog-message {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

/* ==========================================================================
   Identity Detection Banner & Account Status Pill
   ========================================================================== */

.identity-error-banner {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: stepFadeIn 0.25s ease;
}

.identity-error-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.identity-error-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.2;
}

.identity-error-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.identity-error-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #991B1B;
}

.identity-error-text span {
  font-size: 11.5px;
  color: #B91C1C;
  line-height: 1.35;
}

.btn-identity-action {
  flex-shrink: 0;
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.account-identity-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
}

.account-identity-pill .account-text {
  flex: 1;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-identity-pill .account-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #047857;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  flex-shrink: 0;
}

.account-identity-pill.unidentified {
  background: #FEF2F2;
  border-color: #FECACA;
}

.account-identity-pill.unidentified .account-text {
  color: #991B1B;
}

.account-identity-pill.unidentified .account-badge {
  color: #DC2626;
  background: #FEE2E2;
  border-color: #FCA5A5;
}

.identity-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.dialog-input {
  width: 100%;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-dark);
  background: #FFFFFF;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}

.dialog-input:focus {
  border-color: var(--color-saffron);
}
