/* ============================================
   WIZARD MOBILE V4 - COMPLETE RESPONSIVE OVERHAUL
   Perfect UI/UX für iPhone SE, Pixel, iPad, Desktop
   Überschreibt ALLE Inline-Styles mit maximaler Specificity
   ============================================ */

/* ===== BREAKPOINTS =====
   - Mobile Small: < 375px (iPhone SE)
   - Mobile: 375px - 767px
   - Tablet: 768px - 1023px
   - Tablet Large: 1024px
   - Desktop: > 1024px (CSS nicht aktiv)
   ========================================== */


/* ===== GLOBAL RESETS - ALLE DEVICES ===== */
@media (max-width: 1024px) {

  /* Body - Prevent Horizontal Scroll */
  body#wizard-body,
  body,
  html {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* App Container */
  #app {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Main Container */
  #main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Step Container - AGGRESSIVE OVERRIDE */
  .step,
  #step1.step,
  #step2.step,
  #step3.step,
  #step4.step {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    padding: 2rem 1rem !important;
    margin: 1rem auto !important;
    border-radius: 20px !important;
    min-height: auto !important;
    box-sizing: border-box !important;
  }

  /* Überschriften */
  .step h2,
  #step1 h2,
  #step2 h2,
  #step3 h2,
  #step4 h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
    padding: 0 0.5rem !important;
    line-height: 1.3 !important;
  }

  /* Step Description */
  .step .step-description {
    font-size: 0.95rem !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
    padding: 0 0.5rem !important;
    line-height: 1.5 !important;
  }

  /* Footer Text */
  .footer-step,
  .step .footer-step {
    font-size: 0.75rem !important;
    text-align: center !important;
    margin-top: 1.5rem !important;
    letter-spacing: 0.1em !important;
  }
}


/* ===== STEP 1: WILLKOMMEN ===== */
@media (max-width: 1024px) {

  #step1 .main-btn,
  #step1 button.main-btn,
  #step1 a.main-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    font-size: 1.1rem !important;
    padding: 1rem 1.5rem !important;
    margin: 0.8rem auto !important;
    border-radius: 16px !important;
    display: block !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }

  #step1 .main-btn.outline,
  #step1 a.main-btn.outline {
    margin-top: 0.5rem !important;
    background: none !important;
  }
}


/* ===== STEP 2: FOTO AUFNEHMEN - CRITICAL FIXES ===== */
@media (max-width: 1024px) {

  /* Flex Row FORCE Column */
  #step2 .step-flex-row,
  .step-flex-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    width: 100% !important;
    align-items: stretch !important;
  }

  /* Left Box (Buttons) - REMOVE Fixed Height */
  #step2 .step2-left {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: auto !important;
    padding: 1.5rem 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    box-sizing: border-box !important;
  }

  /* Buttons in Step 2 - Touch Friendly */
  #step2 .step2-btn,
  #step2 button.step2-btn,
  #step2 label.step2-btn {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 1.05rem !important;
    padding: 1rem !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Right Box (Video/Preview) - CRITICAL */
  #step2 .step2-right {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    height: auto !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
  }

  /* Video & Preview Images - FIX OVERFLOW */
  #step2 video,
  #step2 #selfiePreview,
  #step2 .selfie-img,
  .selfie-img,
  #selfiePreview {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  /* Canvas */
  #step2 canvas,
  canvas#snapshotCanvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    box-sizing: border-box !important;
  }

  /* Action Buttons - Stack on Mobile */
  #step2 .step2-actions,
  .step2-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
  }

  #step2 .step2-actions .main-btn,
  #step2 .step2-actions button {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* iPhone SE - Smaller Images */
@media (max-width: 375px) {
  #step2 video,
  #step2 #selfiePreview,
  #step2 .selfie-img {
    max-height: 300px !important;
  }
}


/* ===== STEP 3: EXTENSIONS - HORIZONTAL SLIDER ===== */
@media (max-width: 1024px) {

  /* Flex Row → Column */
  #step3 .step-flex-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }

  /* Selfie in Step 3 - Smaller, Centered */
  .selfie-wrap,
  #step3 .selfie-wrap {
    flex: none !important;
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto 1.5rem auto !important;
    min-height: auto !important;
    height: auto !important;
    padding: 0.5rem !important;
    box-sizing: border-box !important;
  }

  #step3Selfie,
  #step3 .selfie-img {
    width: 100% !important;
    height: auto !important;
    max-height: 320px !important;
    object-fit: cover !important;
  }

  /* Step Right Container - Full Width */
  .step-right,
  #step3 .step-right {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* EXTENSIONS SLIDER - HORIZONTAL SCROLL (CRITICAL!) */
  .ext-slider,
  #step3 .ext-slider,
  #extSlider {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 1rem !important;
    padding: 0.5rem 0.25rem 1rem 0.25rem !important;
    margin-bottom: 1.5rem !important;
    width: 100% !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  /* Extension Cards - Fixed Width for Horizontal Scroll */
  .ext-card,
  #step3 .ext-card {
    flex: 0 0 auto !important;
    min-width: 130px !important;
    max-width: 130px !important;
    width: 130px !important;
    padding: 0.4rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
  }

  /* Extension Images */
  .ext-img-wrap,
  .ext-card .ext-img-wrap {
    width: 100% !important;
    aspect-ratio: 10/13 !important;
    overflow: hidden !important;
  }

  .ext-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 10px !important;
  }

  /* Extension Text */
  .ext-card small {
    font-size: 0.75rem !important;
    margin-top: 0.4rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    display: block !important;
  }

  /* Variant Selectors - Stack Vertically */
  .variant-selectors,
  #step3 .variant-selectors {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
    width: 100% !important;
  }

  .variant-selectors select,
  #variantGroupSelect,
  #lengthSelect {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    font-size: 1rem !important;
    min-height: 52px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  /* HAIRTYPE GRID - Keep Grid */
  .hairtype-row,
  #step3 .hairtype-row,
  #hairTypeSelector {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.8rem !important;
    margin-bottom: 1.5rem !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .hair-type-thumb {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Haartyp Labels */
  label[for^="hairType"],
  .hairtype-row label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  label[for^="hairType"] div,
  label[for^="hairType"] span,
  .hairtype-row label div {
    font-size: 0.65rem !important;
    text-align: center !important;
    word-break: break-word !important;
    line-height: 1.2 !important;
  }

  /* Step Buttons - Stack */
  .step-btns,
  #step3 .step-btns {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
  }

  .step-btns .main-btn,
  .step-btns button {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Tablet - Larger Cards */
@media (min-width: 768px) and (max-width: 1024px) {
  .ext-card,
  #step3 .ext-card {
    min-width: 150px !important;
    max-width: 150px !important;
    width: 150px !important;
  }

  .selfie-wrap,
  #step3 .selfie-wrap {
    max-width: 350px !important;
  }

  .hairtype-row,
  #hairTypeSelector {
    gap: 1rem !important;
  }
}

/* iPhone SE - Smaller Everything */
@media (max-width: 375px) {
  .ext-card,
  #step3 .ext-card {
    min-width: 110px !important;
    max-width: 110px !important;
    width: 110px !important;
  }

  .hairtype-row,
  #hairTypeSelector {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.6rem !important;
  }

  .step h2 {
    font-size: 1.3rem !important;
  }

  label[for^="hairType"] div,
  .hairtype-row label div {
    font-size: 0.6rem !important;
  }
}


/* ===== STEP 4: VORHER/NACHHER ===== */
@media (max-width: 1024px) {

  /* Loading Container */
  #loadingContainer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    box-sizing: border-box !important;
  }

  /* Progress Bar */
  .progress-bar {
    width: 100% !important;
    height: 8px !important;
    border-radius: 4px !important;
    margin-bottom: 1rem !important;
  }

  .loading-percent,
  #loadingPercent {
    font-size: 0.9rem !important;
    text-align: center !important;
    margin-bottom: 0.5rem !important;
  }

  /* Logo Animation */
  .logo-static,
  #step4 .logo-static,
  #step4 img[alt*="Logo"],
  #logoAnim {
    max-width: 100px !important;
    height: auto !important;
    margin: 0 auto 1rem auto !important;
    display: block !important;
  }

  /* Spinner */
  .spinner,
  #step4 .spinner,
  #spinner {
    width: 48px !important;
    height: 48px !important;
    border-width: 5px !important;
    margin: 1rem auto !important;
  }

  /* Compare Container */
  .compare,
  #step4 .compare,
  #resultCompare {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem 0 !important;
  }

  /* Compare Frame - Stack Vertically on Mobile */
  .compare-frame {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    min-height: auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .compare-item,
  .compare-item.left,
  .compare-item.right {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .compare-item img,
  #beforeImg,
  #afterImg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 350px !important;
    object-fit: contain !important;
    display: block !important;
  }

  .compare-item figcaption {
    font-size: 0.85rem !important;
    padding: 0.5rem !important;
    text-align: center !important;
  }

  /* Overlay Spinner */
  .compare-overlay,
  #midOverlay {
    width: 80px !important;
    height: 80px !important;
  }

  .mid-spinner {
    width: 40px !important;
    height: 40px !important;
    border-width: 3px !important;
  }

  .mid-text,
  #midPercent {
    font-size: 0.8rem !important;
  }

  /* Step 4 Buttons */
  #step4 .main-btn:not([style*="display:none"]),
  #step4 .main-btn:not([style*="display: none"]),
  #step4 button:not([style*="display:none"]),
  #step4 button:not([style*="display: none"]),
  #backTo3 {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    margin: 0.5rem 0 !important;
    box-sizing: border-box !important;
  }

  /* Respect inline display:none */
  #bookBtn[style*="display:none"],
  #bookBtn[style*="display: none"] {
    display: none !important;
  }
}

/* Tablet - Side by Side */
@media (min-width: 768px) and (max-width: 1024px) {
  .compare-frame {
    flex-direction: row !important;
    gap: 1rem !important;
  }

  .compare-item,
  .compare-item.left,
  .compare-item.right {
    width: 50% !important;
  }

  .compare-item img,
  #beforeImg,
  #afterImg {
    max-height: 400px !important;
  }
}


/* ===== BUTTONS - UNIVERSAL ===== */
@media (max-width: 1024px) {

  /* Main Buttons - Touch Friendly */
  .main-btn:not([style*="display:none"]):not([style*="display: none"]),
  button.main-btn:not([style*="display:none"]):not([style*="display: none"]),
  .btn:not([style*="display:none"]):not([style*="display: none"]),
  button.btn:not([style*="display:none"]):not([style*="display: none"]) {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    font-size: 1.1rem !important;
    padding: 1rem 1.5rem !important;
    border-radius: 16px !important;
    margin: 0.8rem 0 !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Respect inline display:none for ALL buttons */
  button[style*="display:none"],
  button[style*="display: none"],
  .main-btn[style*="display:none"],
  .main-btn[style*="display: none"] {
    display: none !important;
  }

  .main-btn.outline,
  button.outline,
  .btn-outline {
    background: none !important;
    min-height: 52px !important;
  }

  /* Disabled State */
  .main-btn:disabled,
  button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
  }
}


/* ===== SIDEBAR MOBILE ===== */
@media (max-width: 1024px) {

  #sidebar {
    width: 280px !important;
    max-width: 85vw !important;
    padding: 1.5rem 1rem !important;
  }

  #sidebar .logo {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 1rem !important;
  }

  #sidebar .info {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
  }

  #sidebar .info h1 {
    font-size: 1.2rem !important;
    margin-bottom: 0.5rem !important;
  }

  #sidebar .info div {
    margin-bottom: 0.4rem !important;
    word-break: break-word !important;
  }

  #sidebar nav a {
    min-height: 48px !important;
    padding: 0.9rem 1rem !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
  }
}


/* ===== MODALS ===== */
@media (max-width: 1024px) {

  .modal-overlay {
    padding: 1rem !important;
  }

  .modal,
  .modal-content-footer {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    padding: 1.5rem 1rem !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .modal h3 {
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
  }

  .modal .field {
    margin-bottom: 1rem !important;
  }

  .modal .field input,
  .modal .field select,
  #consultantSelect,
  #slotSelect,
  #notesInput {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 1rem !important;
    padding: 0.8rem !important;
    box-sizing: border-box !important;
  }

  .modal .actions {
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
  }

  .modal .actions .btn,
  .cancel-booking,
  .confirm-booking {
    width: 100% !important;
    margin: 0 !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
  }
}


/* ===== FOOTER ===== */
@media (max-width: 1024px) {

  .footer {
    padding: 2rem 1rem !important;
  }

  .footer .container,
  .footer > div {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
    font-size: 0.85rem !important;
  }

  .footer .links {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
  }

  .footer .links a {
    margin: 0 !important;
  }
}


/* ===== THEME TOGGLE ===== */
@media (max-width: 1024px) {

  #themeToggle,
  button#themeToggle {
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0.7rem !important;
    top: 1rem !important;
    right: 1rem !important;
    font-size: 0.9rem !important;
    box-sizing: border-box !important;
  }

  #themeLabel {
    display: none !important;
  }
}


/* ===== ACCESSIBILITY ===== */
@media (max-width: 1024px) {

  /* Touch Feedback */
  button:active,
  .main-btn:active,
  .ext-card:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s !important;
  }

  /* Focus States - High Visibility */
  button:focus,
  select:focus,
  input:focus {
    outline: 3px solid var(--primary, #c99780) !important;
    outline-offset: 2px !important;
  }

  /* Text Selection */
  ::selection {
    background: var(--primary-light, #e7b596) !important;
    color: var(--darker, #181617) !important;
  }
}


/* ===== TEXT OVERFLOW FIXES ===== */
@media (max-width: 1024px) {

  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }

  p, div, span {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}


/* ===== SCROLLBAR STYLING ===== */
@media (max-width: 1024px) {

  /* Hide Scrollbar for Extension Slider */
  .ext-slider::-webkit-scrollbar {
    height: 6px !important;
  }

  .ext-slider::-webkit-scrollbar-thumb {
    background: var(--primary, #c99780) !important;
    border-radius: 3px !important;
  }

  .ext-slider::-webkit-scrollbar-track {
    background: transparent !important;
  }

  /* Firefox */
  .ext-slider {
    scrollbar-width: thin !important;
    scrollbar-color: var(--primary, #c99780) transparent !important;
  }
}


/* ===== LANDSCAPE MODE ===== */
@media (max-width: 1024px) and (orientation: landscape) {

  /* Reduce vertical heights in landscape */
  #step2 video,
  #step2 #selfiePreview,
  #step2 .selfie-img {
    max-height: 50vh !important;
  }

  #step3Selfie,
  #step3 .selfie-img {
    max-height: 40vh !important;
  }

  .compare-item img,
  #beforeImg,
  #afterImg {
    max-height: 50vh !important;
  }

  /* Compare side-by-side in landscape */
  .compare-frame {
    flex-direction: row !important;
  }

  .compare-item,
  .compare-item.left,
  .compare-item.right {
    width: 50% !important;
  }
}


/* ===== SAFE AREA INSETS (iPhone X+) ===== */
@supports (padding: max(0px)) {
  @media (max-width: 1024px) {

    body {
      padding-left: max(0px, env(safe-area-inset-left)) !important;
      padding-right: max(0px, env(safe-area-inset-right)) !important;
    }

    .step {
      padding-bottom: max(2rem, calc(2rem + env(safe-area-inset-bottom))) !important;
    }

    #sidebar {
      padding-top: max(1rem, env(safe-area-inset-top)) !important;
      padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    }

    #themeToggle {
      top: max(1rem, env(safe-area-inset-top)) !important;
      right: max(1rem, env(safe-area-inset-right)) !important;
    }
  }
}


/* ===== UTILITY CLASSES ===== */
@media (max-width: 1024px) {

  .hidden {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .desktop-only {
    display: none !important;
  }
}


/* ===== LOADING STATES ===== */
@media (max-width: 1024px) {

  .booking-progress,
  .booking-feedback {
    padding: 1rem !important;
    gap: 1rem !important;
  }

  .mini-spinner {
    width: 32px !important;
    height: 32px !important;
    border-width: 3px !important;
  }

  .progress-text {
    font-size: 0.95rem !important;
    text-align: center !important;
  }

  .feedback-icon {
    font-size: 2rem !important;
  }
}


/* ===== PRINT STYLES ===== */
@media print {

  .ext-slider {
    display: flex !important;
    overflow: visible !important;
  }

  .compare-frame {
    flex-direction: row !important;
  }

  button,
  .main-btn,
  #themeToggle,
  #sidebar {
    display: none !important;
  }
}


/* ===== ANIMATIONS ===== */
@media (max-width: 1024px) {

  /* Smooth transitions */
  .step,
  .ext-card,
  .main-btn,
  button {
    transition: all 0.2s ease-in-out !important;
  }

  /* Reduce motion for accessibility */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}


/* ===== DEBUGGING (Remove in production) ===== */
/*
@media (max-width: 1024px) {
  .debug-badge {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.6rem !important;
    position: fixed !important;
    top: 3.5rem !important;
    right: 0.5rem !important;
    z-index: 9999 !important;
    background: red !important;
    color: white !important;
  }
}
*/

/* ===== PRICE ESTIMATES STYLING ===== */
.price-estimates-container {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.price-estimates-header {
  text-align: center;
  font-size: 1.8rem;
  color: var(--primary, #c7a77d);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.price-estimate-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.price-estimate-card.recommended {
  border-color: var(--primary, #c7a77d);
  box-shadow: 0 6px 20px rgba(199, 167, 125, 0.25);
}

.price-estimate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.price-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.price-method-name {
  flex: 1;
}

.price-method-name h4 {
  font-size: 1.4rem;
  color: #333;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.price-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary, #c7a77d), rgba(199, 167, 125, 0.7));
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-match-score {
  background: #f5f5f5;
  color: var(--primary, #c7a77d);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.95rem;
}

.price-details {
  margin-bottom: 1.2rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  font-size: 1rem;
}

.price-row.highlight {
  background: linear-gradient(135deg, rgba(199, 167, 125, 0.1), rgba(199, 167, 125, 0.05));
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.price-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #555;
  font-weight: 500;
}

.price-value {
  color: #333;
  font-weight: 700;
}

.price-row.highlight .price-label {
  color: var(--primary, #c7a77d);
  font-weight: 700;
}

.price-row.highlight .price-value {
  color: var(--primary, #c7a77d);
  font-size: 1.3rem;
}

.price-breakdown {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 10px;
  margin: 0.8rem 0;
}

.price-breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  color: #666;
  font-size: 0.95rem;
}

.price-breakdown-item:not(:last-child) {
  border-bottom: 1px solid #eee;
}

.price-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.price-info-item {
  background: #f5f5f5;
  padding: 0.8rem;
  border-radius: 10px;
  text-align: center;
}

.price-info-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-info-value {
  font-size: 1.1rem;
  color: #333;
  font-weight: 700;
}

.price-maintenance-note {
  background: #fff8e8;
  border-left: 4px solid #ffc107;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.price-cta-button {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary, #c7a77d), rgba(199, 167, 125, 0.8));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(199, 167, 125, 0.3);
}

.price-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(199, 167, 125, 0.4);
}

.price-cta-button:active {
  transform: translateY(0);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .price-estimates-container {
    padding: 0 0.5rem;
  }

  .price-estimates-header {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .price-estimate-card {
    padding: 1rem;
  }

  .price-method-name h4 {
    font-size: 1.2rem;
  }

  .price-card-header {
    flex-direction: column;
    gap: 0.8rem;
  }

  .price-match-score {
    align-self: flex-start;
  }

  .price-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .price-row.highlight .price-value {
    font-size: 1.1rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .price-estimate-card {
    background: #2a2a2a;
    border-color: rgba(199, 167, 125, 0.3);
  }

  .price-method-name h4 {
    color: #e0e0e0;
  }

  .price-label {
    color: #b0b0b0;
  }

  .price-value {
    color: #e0e0e0;
  }

  .price-breakdown {
    background: #333;
  }

  .price-info-item {
    background: #333;
  }

  .price-info-value {
    color: #e0e0e0;
  }
}

/* ===== BOOKING MODAL STYLING ===== */
.booking-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.booking-modal.active {
  opacity: 1;
  visibility: visible;
}

.booking-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.booking-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.booking-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.booking-modal-close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

.booking-modal-title {
  font-size: 1.8rem;
  color: var(--primary, #c7a77d);
  margin: 0 0 0.5rem 0;
}

.booking-modal-subtitle {
  color: #666;
  margin: 0 0 2rem 0;
  font-size: 1.1rem;
}

/* Booking Steps */
.booking-step {
  display: none;
}

.booking-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.booking-step h3 {
  color: var(--primary, #c7a77d);
  font-size: 1.3rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Stylist Selection */
.stylist-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stylist-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.stylist-card:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.stylist-card.selected {
  border-color: var(--primary, #c7a77d);
  background: rgba(199, 167, 125, 0.1);
}

.stylist-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #c7a77d), rgba(199, 167, 125, 0.7));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-right: 1rem;
}

.stylist-info {
  flex: 1;
}

.stylist-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.3rem;
}

.stylist-experience {
  font-size: 0.9rem;
  color: #666;
}

.stylist-select-icon {
  font-size: 1.5rem;
  color: var(--primary, #c7a77d);
}

/* Calendar */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.8rem;
}

.calendar-day {
  padding: 1rem 0.5rem;
  background: #f9f9f9;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.calendar-day:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.calendar-day.selected {
  border-color: var(--primary, #c7a77d);
  background: rgba(199, 167, 125, 0.1);
}

.calendar-day-name {
  font-size: 0.85rem;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.calendar-day-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.2rem;
}

.calendar-day-month {
  font-size: 0.85rem;
  color: #666;
}

/* Time Slots */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.8rem;
}

.time-slot {
  padding: 1rem;
  background: #f9f9f9;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.time-slot:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.time-slot.selected {
  border-color: var(--primary, #c7a77d);
  background: rgba(199, 167, 125, 0.2);
  color: var(--primary, #c7a77d);
}

/* Booking Form */
.booking-summary {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

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

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary, #c7a77d);
}

.booking-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.booking-actions button {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary, #c7a77d), rgba(199, 167, 125, 0.8));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(199, 167, 125, 0.3);
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

/* Loading & Error States */
.calendar-loading,
.time-slots-loading,
.no-slots,
.error {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1.05rem;
}

.error {
  color: #d32f2f;
}

/* Success Modal */
.success-modal {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: #4caf50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
}

.success-modal h2 {
  color: #4caf50;
  margin-bottom: 1rem;
}

.success-modal p {
  margin-bottom: 0.8rem;
  color: #666;
  line-height: 1.6;
}

/* Message Overlay */
.message-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.message-overlay.active {
  opacity: 1;
  visibility: visible;
}

.message-content {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .booking-modal-content {
    padding: 1.5rem;
    width: 95%;
    max-height: 95vh;
  }

  .booking-modal-title {
    font-size: 1.4rem;
  }

  .calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
  }

  .time-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }

  .booking-actions {
    flex-direction: column;
  }
}

/* ===== ANIMATED LOADING INDICATORS ===== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-traffic-light {
  0%, 100% { 
    background: #ffc107;
    box-shadow: 0 0 10px #ffc107, 0 0 20px #ffc107, 0 0 30px #ffc107;
  }
  50% { 
    background: #4caf50;
    box-shadow: 0 0 10px #4caf50, 0 0 20px #4caf50, 0 0 30px #4caf50;
  }
}

/* Animated loading circle */
.loading-circle {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(199, 167, 125, 0.2);
  border-top-color: var(--primary, #c7a77d);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Traffic light indicator */
.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4caf50;
  animation: pulse-traffic-light 2s ease-in-out infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Loading state for generation */
.generation-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  margin: 2rem 0;
}

.generation-loading-text {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
}

/* ===== STEP DOT ANIMATION DURING LOADING ===== */
/* Add pulsing animation to active step dot while loading */
.questionnaire-card .step-dot.active {
  animation: pulse-traffic-light 2s ease-in-out infinite;
}

/* Ensure step dots have base styling */
.step-indicator .step-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  margin: 0 0.3rem;
  transition: all 0.3s ease;
}

.step-indicator .step-dot.active {
  background: #ffc107;
  box-shadow: 0 0 10px #ffc107;
}

.step-indicator .step-dot.completed {
  background: #4caf50;
}

/* ===== GENERATION PREVIEW ===== */
.generation-preview-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.generation-preview-container.show {
  opacity: 1;
  transform: translateY(0);
}

.generation-preview-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 248, 246, 0.9));
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.preview-header h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.preview-header p {
  color: #666;
  font-size: 0.9rem;
}

.preview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .preview-content {
    grid-template-columns: 1fr;
  }
}

.preview-image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.preview-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.preview-match-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(76, 175, 80, 0.95);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.preview-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}

.preview-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.preview-label {
  font-weight: 600;
  color: var(--primary);
}

.preview-value {
  color: #333;
  font-weight: 500;
}

.preview-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.preview-footer small {
  color: #999;
  font-size: 0.85rem;
  font-style: italic;
}
