/* ==========================================================================
   Obsidian Dark Glassmorphism Styling System
   ========================================================================== */

:root {
  /* Color Palette - Brotype Design System Tokens */
  --bg-primary: #0C0C0C;     /* Page background */
  --bg-2: #111111;           /* Alternate background */
  --bg-card: #141414;        /* Default card / panel */
  --bg-card-2: #171717;      /* Secondary card */
  --bg-elevated: #1A1A1A;    /* Nav bar, pills */
  --bg-input: #1F1F1F;       /* Inputs, chips, secondary buttons */
  --border-color: rgba(255, 255, 255, 0.08);   /* Hairline borders */
  --border-color-hover: rgba(255, 255, 255, 0.12); /* Hover / stronger borders */
  
  /* Text Colors */
  --color-text: #FFFFFF;     /* Primary text, headings */
  --color-muted-2: #B5B5B5;  /* Secondary / body copy */
  --color-muted: #9A9A9A;    /* Captions, meta */
  
  /* Brand & Accent */
  --accent-red: #D42C2C;     /* Brotype Red - buttons, active elements */
  --accent-red-hover: #B62525; /* Red hover state */
  --color-success: #1F9E55;  /* Success, checkmarks */
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.08);
  --color-star: #FFC532;     /* Star ratings */
  --color-pink: #EC4899;     /* Highlight icons */
  --color-whatsapp: #25d366;
  
  /* Focus States & Glows */
  --border-focus: var(--accent-red);
  --accent-glow: rgba(212, 44, 44, 0.15);
  --primary-glow: 0 10px 30px -10px rgba(212, 44, 44, 0.55);
  
  /* Typography & Layout Spacing */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family: var(--font-body);
  
  /* Corner Radii */
  --radius-chip: 12px;
  --radius-logo: 14px;
  --radius-card: 18px;
  --radius-panel: 22px;
  --radius-pill: 999px;
  
  /* Transition Easings matching Signature Curve cubic-bezier(0.2, 0.8, 0.2, 1) */
  --transition-smooth: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-card: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  
  /* Aliases for backwards compatibility */
  --radius-lg: var(--radius-card);
  --radius-md: var(--radius-chip);
  --accent-indigo: var(--accent-red);
  --accent-purple: var(--accent-red);
}

/* Typography Headings Override */
h1, h2, h3, h4, h5, h6, .main-title, .question-label, .section-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--color-text);
  min-height: 100vh;
  min-height: -webkit-fill-available; /* Fixed mobile viewport issue */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html {
  height: -webkit-fill-available;
}

/* Background Glowing Blobs */
.blob {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.blob-1 {
  background-color: var(--accent-red);
  top: 10%;
  left: -50px;
}

.blob-2 {
  background-color: var(--color-pink);
  bottom: 15%;
  right: -50px;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* App Header */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

body.layout-single-page .app-header {
  padding-top: 48px;
  margin-bottom: 48px;
}

/* ==========================================================================
   Core Containers
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 500px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  z-index: 2;
}

/* Progress Indicator */
.progress-container {
  width: 100%;
  margin-bottom: 25px;
  transition: var(--transition-smooth);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4A82FF, #A78BFA);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 600;
  margin-top: 8px;
  text-align: right;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Glassmorphic Form Cards
   ========================================================================== */
.form-steps-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.step-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: var(--transition-card);
  width: 100%;
}

.step-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--accent-red);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.question-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.question-hint {
  font-family: var(--font-body);
  font-size: 0.8125rem; /* 13px */
  font-weight: 500;
  color: var(--color-muted);
  line-height: 1.5;
  margin-top: -8px;
}

/* Welcome Card Specifics */
.welcome-card {
  text-align: center;
  align-items: center;
  padding: 40px 30px;
}

.brand-logo-container {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.brand-logo-img {
  max-width: 170px;
  height: auto;
  display: block;
}

.main-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.highlight-text {
  color: var(--accent-red);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.welcome-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-muted-2);
  line-height: 1.55;
}

/* ==========================================================================
   Inputs & Controls
   ========================================================================== */
.input-field-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  padding: 16px 20px;
  font-size: 1rem;
  font-family: var(--font-family);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-smooth);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: rgba(15, 23, 42, 0.8);
}

/* ==========================================================================
   Interactive Qualification Visual Cards Grid
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.selection-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  transition: var(--transition-card);
  user-select: none;
}

.selection-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.02);
}

.selection-card.selected {
  border-color: var(--accent-red);
  background: rgba(212, 44, 44, 0.06);
  box-shadow: 0 0 20px rgba(212, 44, 44, 0.1), inset 0 0 8px rgba(212, 44, 44, 0.05);
}

.card-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.selection-card.selected .card-icon-wrapper {
  background: var(--accent-red);
  color: var(--color-text);
  box-shadow: 0 4px 10px rgba(212, 44, 44, 0.3);
}

.card-icon {
  width: 20px;
  height: 20px;
  color: var(--color-muted);
  transition: var(--transition-smooth);
}

.selection-card.selected .card-icon {
  color: #ffffff;
}

.card-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Qualification "Other" text input panel */
.other-input-container {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.other-input-container.visible {
  max-height: 100px;
  opacity: 1;
  margin-top: 10px;
}

.sub-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Preferred Call Time Chips
   ========================================================================== */
.chips-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.time-chip {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-card);
}

.time-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.time-chip.selected {
  border-color: var(--accent-red);
  background: rgba(212, 44, 44, 0.06);
  box-shadow: 0 0 15px rgba(212, 44, 44, 0.05);
}

.chip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chip-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.chip-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.chip-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.time-chip.selected .chip-check {
  border-color: var(--accent-red);
  background-color: var(--accent-red);
}

.time-chip.selected .chip-check::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
}

/* ==========================================================================
   Searchable Country Dropdown
   ========================================================================== */
.phone-input-container {
  display: flex;
  position: relative;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  transition: var(--transition-smooth);
}

.phone-input-container:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.country-select-btn {
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-right: 1px solid var(--border-color);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  cursor: pointer;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.country-select-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chevron {
  color: var(--color-muted);
  transition: transform 0.3s ease;
}

.country-select-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.phone-input-container .form-input {
  border: none;
  background: transparent;
  border-radius: 0;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.phone-input-container .form-input:focus {
  box-shadow: none;
  background: transparent;
}

/* Searchable Country Code Dropdown overlay menu */
.country-dropdown-menu {
  position: absolute;
  top: 105%;
  left: 0;
  width: 260px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.country-dropdown-menu.show {
  display: flex;
}

.search-box-container {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.search-box-container input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  outline: none;
  font-family: var(--font-family);
  font-size: 0.85rem;
}

.country-list {
  max-height: 200px;
  overflow-y: auto;
  list-style: none;
}

.country-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.country-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.country-item .dial-code {
  color: var(--color-muted);
  margin-left: auto;
  font-weight: 600;
}

/* ==========================================================================
   Submit, Summary & Consent
   ========================================================================== */
.summary-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.summary-lbl {
  color: var(--color-muted);
  font-weight: 500;
}

.summary-val {
  font-weight: 600;
  color: var(--color-text);
  max-width: 60%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consent-container {
  margin-top: 10px;
}

.consent-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.consent-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-visual {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.consent-checkbox-label:hover .checkbox-visual {
  border-color: rgba(255, 255, 255, 0.3);
}

.consent-checkbox-label input:checked ~ .checkbox-visual {
  border-color: var(--accent-red);
  background-color: var(--accent-red);
}

.consent-checkbox-label input:checked ~ .checkbox-visual::after {
  content: "";
  display: block;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.consent-text {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Honeypot Input Container (Hidden offscreen securely) */
.honeypot-container {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Validation & Error feedback (:user-invalid rules)
   ========================================================================== */
.error-msg {
  display: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-error);
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--color-error-bg);
  border-left: 3px solid var(--color-error);
  margin-top: 4px;
}

/* Apply error state visual styles based on modern user interactions */
.form-input:user-invalid,
.user-invalid-fallback {
  border-color: var(--color-error) !important;
  background-color: var(--color-error-bg) !important;
}

.form-input:user-invalid + .error-msg,
.user-invalid-fallback + .error-msg {
  display: block;
}

/* Target containers with custom component checks (e.g. checks via class toggle in JS) */
.phone-input-container.invalid-phone {
  border-color: var(--color-error) !important;
  background-color: var(--color-error-bg) !important;
}

.phone-input-container.invalid-phone + .error-msg {
  display: block;
}

/* Target select grids/chips with validation states */
.field-invalid-state + .error-msg {
  display: block;
}

/* Success Validation accent confirmation */
.form-input:user-valid {
  border-color: var(--color-success);
}

/* ==========================================================================
   Loader and Errors
   ========================================================================== */
.loader-container {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--color-muted);
  padding: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.network-error-card {
  display: none;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--color-error);
  text-align: center;
  margin-bottom: 5px;
}

/* ==========================================================================
   Success Screen
   ========================================================================== */
.success-card {
  text-align: center;
  align-items: center;
  padding: 40px 30px;
  position: relative;
  overflow: hidden;
}

#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.success-icon-container {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  z-index: 1;
}

.success-icon {
  width: 44px;
  height: 44px;
  color: var(--color-success);
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.4));
}

.success-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 5px;
  z-index: 1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-card);
  user-select: none;
  text-decoration: none;
  width: 100%;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-red);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-red-hover);
  box-shadow: var(--primary-glow);
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-text);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-hover);
}

.btn-whatsapp {
  background-color: var(--color-whatsapp);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  z-index: 1;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  background-color: #20ba59;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
}

.whatsapp-icon {
  width: 20px;
  height: 20px;
}

/* Step navigation layouts */
.step-nav-buttons {
  display: flex;
  gap: 10px;
}

.step-nav-buttons .btn-secondary {
  width: 35%;
}

.step-nav-buttons .btn-primary {
  width: 65%;
}

/* Footer layout rules */
.app-footer {
  padding: 20px;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 500;
}

/* ==========================================================================
   Layout Styles Switcher Engine
   ========================================================================== */

/* 1. LAYOUT: CONVERSATIONAL VIEW (Default) */
body.layout-conversational .form-step {
  display: none;
  opacity: 0;
  pointer-events: none;
}

body.layout-conversational .form-step.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  animation: slideIn 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

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

/* 2. LAYOUT: SINGLE-SCROLL STACKED VIEW */
body.layout-single-page #progress-bar-container {
  display: none !important;
}

body.layout-single-page .form-steps-wrapper {
  gap: 25px;
}

body.layout-single-page .form-step {
  display: none; /* Hide steps default */
  position: relative;
}

/* Stack steps in reverse order so dropdowns in earlier cards float on top of subsequent cards */
body.layout-single-page #step-name { z-index: 5; }
body.layout-single-page #step-phone { z-index: 4; }
body.layout-single-page #step-qualification { z-index: 3; }
body.layout-single-page #step-time { z-index: 2; }
body.layout-single-page #step-submit { z-index: 1; }

/* Show the steps we need in single page mode */
body.layout-single-page .form-step:not(#step-welcome):not(#step-submit):not(#step-success) {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Modify cards for stacked single page */
body.layout-single-page .form-step:not(#step-welcome):not(#step-submit):not(#step-success) .step-card {
  padding: 24px 20px;
}

body.layout-single-page .step-badge {
  display: none;
}

/* Hide navigation buttons on inner steps in single page mode */
body.layout-single-page .form-step:not(#step-submit) .step-nav-buttons {
  display: none !important;
}

/* Layout for submit review and consent in single page mode */
body.layout-single-page #step-submit {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide review summary box in single scroll page since it's directly visible above */
body.layout-single-page #step-submit .summary-box {
  display: none;
}

body.layout-single-page #step-submit .section-title {
  display: none;
}

/* Hide back button on the final step in single page mode, submit occupies full width */
body.layout-single-page #step-submit .step-nav-buttons .btn-secondary {
  display: none !important;
}

body.layout-single-page #step-submit .step-nav-buttons .btn-primary {
  width: 100% !important;
}

/* Success screen overrides */
body.layout-single-page .form-step.success-active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide other content on success in single page mode */
body.layout-single-page.success-state .form-step:not(#step-success) {
  display: none !important;
}

/* ==========================================================================
   Micro-Animations
   ========================================================================== */
.animate-pop {
  animation: popEffect 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popEffect {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Mobile Optimization
   ========================================================================== */
@media (max-width: 480px) {
  .app-container {
    padding: 10px 14px;
  }
  
  .step-card {
    padding: 24px 18px;
    gap: 16px;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
  
  .question-label {
    font-size: 1.25rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .selection-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 16px;
    gap: 14px;
    text-align: left;
  }
  
  .card-icon-wrapper {
    width: 38px;
    height: 38px;
  }
}

/* ==========================================================================
   Light Theme Preferences Override
   ========================================================================== */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #F8FAFC;     /* Page background */
    --bg-2: #F1F5F9;           /* Alternate background */
    --bg-card: #FFFFFF;        /* Default card / panel */
    --bg-card-2: #F8FAFC;      /* Secondary card */
    --bg-elevated: #F1F5F9;    /* Nav bar, pills */
    --bg-input: #FFFFFF;       /* Inputs, chips, secondary buttons */
    --border-color: rgba(12, 12, 12, 0.08);   /* Hairline borders */
    --border-color-hover: rgba(12, 12, 12, 0.12); /* Hover / stronger borders */
    
    /* Text Colors */
    --color-text: #0C0C0C;     /* Primary text, headings */
    --color-muted-2: #4D4D4D;  /* Secondary / body copy */
    --color-muted: #6E6E6E;    /* Captions, meta */
    
    /* Brand & Accent */
    --accent-red: #D42C2C;     /* Brotype Red */
    --accent-red-hover: #B62525; /* Red hover state */
    --color-success: #1F9E55;
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.05);
    
    --border-focus: var(--accent-red);
    --accent-glow: rgba(212, 44, 44, 0.08);
  }
  
  /* Make ambient background blobs brighter and slightly more transparent for light mode */
  .blob-1 {
    background-color: var(--accent-red);
    opacity: 0.08;
  }
  
  .blob-2 {
    background-color: var(--color-pink);
    opacity: 0.08;
  }
  
  /* Adjust input field shadows and borders in light mode */
  .form-input {
    border: 1px solid rgba(12, 12, 12, 0.12);
  }
  
  .form-input:focus {
    background: #ffffff;
    border-color: var(--accent-red);
  }
  
  /* Adjust dropdown style for light mode */
  .country-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(12, 12, 12, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
  
  .search-box-container input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #000;
  }
  
  .country-item {
    color: #0C0C0C;
  }
  
  .country-item:hover {
    background: rgba(212, 44, 44, 0.08);
  }
  
  /* Adjust other lists and active card shadows */
  .step-card {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04);
  }
  
  .selection-card {
    border-color: rgba(12, 12, 12, 0.08);
  }
  
  .selection-card:hover {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(12, 12, 12, 0.15);
  }
  
  .selection-card.selected {
    background: rgba(212, 44, 44, 0.05);
    border-color: var(--accent-red);
  }
  
  .card-icon-wrapper {
    background: rgba(0, 0, 0, 0.02);
  }
  
  .time-chip {
    border-color: rgba(12, 12, 12, 0.08);
  }
  
  .time-chip:hover {
    border-color: rgba(12, 12, 12, 0.15);
  }
  
  .time-chip.selected {
    background: rgba(212, 44, 44, 0.05);
    border-color: var(--accent-red);
  }
  
  .btn-secondary {
    background: rgba(0, 0, 0, 0.02);
    color: #0C0C0C;
    border-color: rgba(12, 12, 12, 0.08);
  }
  
  .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(12, 12, 12, 0.15);
  }
  
  .summary-box {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(12, 12, 12, 0.06);
  }
  
  .success-icon-container {
    background: rgba(31, 158, 85, 0.08);
  }

  .form-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
  }

  .sub-label {
    color: var(--accent-red);
  }

  .step-badge {
    color: var(--accent-red);
  }
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

@media (max-width: 576px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    align-items: center;
  }
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toast-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast.toast-error {
  border-left: 4px solid var(--color-error);
}

.toast.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1;
}

.toast-content {
  flex-grow: 1;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
