/**
 * Pocket-Sommelier - Scan Redesign Styles
 * Version 4.0 - UX Redesign
 * 
 * Features:
 * 1. Semi-transparent first-visit onboarding overlay
 * 2. Ghost overlays for viewfinder (progressive reduction)
 * 3. "Sommelier's Journal" wait screen (liquid glass, trivia, typewriter)
 * 4. Ink-bleed ambient background
 * 5. Progressive reduction (visit-counted hints)
 * 
 * Depends on: themes.css (design tokens), main.css (--gold variables)
 */


/* ==================================================================
   FIRST-VISIT ONBOARDING OVERLAY (semi-transparent)
   Camera visible through gradient background
   ================================================================== */

.scan-onboarding {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    pointer-events: none;
}

.scan-onboarding.active {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.scan-onboarding-body {
    pointer-events: auto;
}

/* Gradient: camera visible at top, darkens toward bottom for cards */
.scan-onboarding-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.08) 0%,
        rgba(0, 0, 0, 0.2) 15%,
        rgba(0, 0, 0, 0.45) 35%,
        rgba(0, 0, 0, 0.75) 55%,
        rgba(17, 24, 39, 0.92) 72%,
        rgba(17, 24, 39, 0.97) 100%
    );
    pointer-events: none;
}

.scan-onboarding-body {
    position: relative;
    z-index: 2;
    padding: 0 20px 24px;
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---- Branding Header ---- */
.scan-onb-header {
    text-align: center;
    margin-bottom: 16px;
}

.scan-onb-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
}

.scan-onb-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    margin: 0;
}

/* ---- Rotierende Banner ---- */
.scan-onb-banner {
    position: relative;
    min-height: 72px;
    margin-bottom: 16px;
    text-align: center;
}

.scan-onb-banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scan-onb-banner-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.scan-onb-banner-dots {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.scan-onb-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s, transform 0.3s;
}

.scan-onb-dot.active {
    background: var(--gold, #C5A059);
    transform: scale(1.2);
}

/* ---- CTA Area ---- */
.scan-onb-cta-area {
    margin-top: 8px;
}

.scan-onb-cta-button {
    width: 100%;
    padding: 14px;
    background: var(--gold-gradient, linear-gradient(135deg, #C5A059, #D4AF37, #B8860B));
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: -0.01em;
}

.scan-onb-cta-button:active {
    transform: scale(0.97);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
}

.scan-onb-cta-button svg {
    width: 17px;
    height: 17px;
}

.scan-onb-cta-sub {
    display: none;
}


/* ==================================================================
   GHOST OVERLAYS (viewfinder hint for first visits)
   ================================================================== */

.scan-ghost-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.scan-ghost-overlay.visible {
    opacity: 1;
}

.scan-ghost-overlay svg {
    width: 65%;
    max-width: 170px;
    animation: scan-ghost-float 4s ease-in-out infinite;
}

@keyframes scan-ghost-float {
    0%, 100% { opacity: 0.1; transform: translateY(2px) scale(0.97); }
    50%      { opacity: 0.2; transform: translateY(-2px) scale(1.01); }
}

.scan-ghost-label {
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    animation: scan-ghost-float 4s ease-in-out infinite;
}


/* ==================================================================
   RETURNING USER HINT (visit 2-3)
   ================================================================== */

.scan-returning-hint {
    position: absolute;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px) + 50px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.scan-returning-hint.visible {
    opacity: 1;
}


/* ==================================================================
   HELP BUTTON (expert mode, ? in top bar)
   ================================================================== */

.scan-help-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scan-help-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scan-help-btn svg {
    width: 24px;
    height: 24px;
}


/* ==================================================================
   AUTO BADGE (pulsing dot in topbar)
   ================================================================== */

.scan-auto-badge-v2 {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 160, 89, 0.18);
    border-radius: 16px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--gold-light, #D4AF37);
}

.scan-auto-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold-light, #D4AF37);
    display: block;
    animation: scan-badge-pulse 2.2s ease-in-out infinite;
}

@keyframes scan-badge-pulse {
    0%, 100% { opacity: 0.25; transform: scale(0.7); }
    50%      { opacity: 1; transform: scale(1.15); }
}


/* ==================================================================
   WAIT SCREEN — "Sommelier's Journal" Experience
   Replaces the old timer/countdown
   ================================================================== */

.scan-wait-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    /* Theme-aware background */
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ---- Ink-bleed ambient blobs ---- */
.scan-wait-ink {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    will-change: transform, opacity;
}

.scan-wait-ink-1 {
    width: 280px;
    height: 280px;
    top: -40px;
    left: -60px;
    background: rgba(114, 47, 55, 0.10);
    animation: scan-ink-drift 18s ease-in-out infinite alternate;
}

.scan-wait-ink-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: -40px;
    background: rgba(197, 160, 89, 0.08);
    animation: scan-ink-drift 22s ease-in-out infinite alternate-reverse;
}

.scan-wait-ink-3 {
    width: 160px;
    height: 160px;
    top: 40%;
    left: 30%;
    background: rgba(75, 13, 24, 0.08);
    animation: scan-ink-drift 15s ease-in-out 3s infinite alternate;
}

/* Dark mode: kräftigere Ink-Blobs */
[data-theme="dark"] .scan-wait-ink-1 {
    background: rgba(114, 47, 55, 0.15);
}
[data-theme="dark"] .scan-wait-ink-2 {
    background: rgba(197, 160, 89, 0.10);
}
[data-theme="dark"] .scan-wait-ink-3 {
    background: rgba(75, 13, 24, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .scan-wait-ink-1 {
        background: rgba(114, 47, 55, 0.15);
    }
    :root:not([data-theme="light"]) .scan-wait-ink-2 {
        background: rgba(197, 160, 89, 0.10);
    }
    :root:not([data-theme="light"]) .scan-wait-ink-3 {
        background: rgba(75, 13, 24, 0.12);
    }
}

@keyframes scan-ink-drift {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
    33%  { transform: translate(20px, -15px) scale(1.1); opacity: 0.8; }
    66%  { transform: translate(-10px, 20px) scale(0.95); opacity: 0.6; }
    100% { transform: translate(15px, 10px) scale(1.05); opacity: 0.7; }
}

/* ---- Phase badge — knapp über Trivia ---- */
.scan-wait-header {
    flex-shrink: 0;
    padding: 0 24px;
    padding-top: max(52px, calc(env(safe-area-inset-top, 0px) + 16px));
    padding-bottom: 16px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.scan-wait-phase {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--gold-light, #D4AF37);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    pointer-events: none;
    cursor: default;
    opacity: 0.75;
}

.scan-wait-phase svg {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

/* ---- Zone 1: Progress Ring (ersetzt Liquid Glass) ---- */
/* Zone 1: entfernt (keine Prozentanzeige mehr) */

/* ---- Zone 2: Trivia Card + Typewriter (vertikal zentriert) ---- */
.scan-wait-z2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    position: relative;
    z-index: 2;
}

.scan-trivia-card {
    width: 100%;
    /* Theme-aware card */
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: opacity 0.45s ease;
}

/* Gold accent line at top of trivia card */
.scan-trivia-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: var(--gold-gradient, linear-gradient(135deg, #C5A059, #D4AF37, #B8860B));
    opacity: 0.4;
    border-radius: 14px 14px 0 0;
}

.scan-trivia-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold, #C5A059);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.scan-trivia-label svg {
    width: 14px;
    height: 14px;
    fill: var(--gold, #C5A059);
}

.scan-trivia-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.scan-trivia-body {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Mini progress bar (time until next trivia fact) */
.scan-trivia-progress {
    margin-top: 16px;
    height: 2px;
    background: var(--border-color);
    border-radius: 1px;
    overflow: hidden;
}

.scan-trivia-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gold, #C5A059);
    border-radius: 1px;
    opacity: 0.6;
}

/* ---- Zone 3: Typewriter (Labor Illusion) — direkt unter Trivia ---- */
.scan-wait-z3 {
    flex-shrink: 0;
    padding: 20px 24px 14px;
    position: relative;
    z-index: 2;
}

.scan-typewriter-v2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-left: 28px;
}

.scan-tw-line {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    line-height: 1.5;
    text-align: left;
}

.scan-tw-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.scan-tw-line.done {
    opacity: 0.5;
}

/* Dezenter Lade-Punkt statt Hacker-Cursor */
.scan-tw-cursor {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--gold, #C5A059);
    border-radius: 50%;
    flex-shrink: 0;
    animation: scan-tw-pulse 1.2s ease-in-out infinite;
}

@keyframes scan-tw-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%      { opacity: 0.8; transform: scale(1); }
}

/* Elegantes Häkchen statt Hacker-Zeichen */
.scan-tw-check {
    color: var(--gold, #C5A059);
    font-weight: 500;
    flex-shrink: 0;
    font-size: 13px;
}

.scan-tw-line.done .scan-tw-cursor {
    display: none;
}


/* ==================================================================
   NAVIGATION: IMMER SICHTBAR über Scan-Screens
   
   Gemessen am Screenshot (iPhone 14, Chrome/Safari):
   - Glass-Nav Oberkante: ~70px vom Viewport-Bottom
   - Hero-Button Oberkante: ~105px vom Viewport-Bottom  
   - Alle Werte als feste px (env(safe-area-inset-bottom) = 0 in Browser)
   
   WICHTIG: Höhere Spezifität (.scan-camera-container ...)
   damit diese Regeln garantiert scan.css überschreiben!
   ================================================================== */

.glass-nav {
    z-index: 200 !important;
}

/* Viewfinder-Ecken: Original-Wert aus scan.css beibehalten (korrekt) */

/* Capture-Button: knapp über Hero-Button
   Hero-Oberkante: ~105px vom Viewport-Bottom
   Button-Höhe: 72px → Unterkante muss bei ~110px sein
   → padding-bottom = 110px bringt Button-Unterkante auf Hero-Oberkante */
.scan-camera-container .scan-camera-overlay .scan-camera-controls {
    padding-bottom: 110px !important;
    z-index: 3 !important;
}

/* Bottom Sheet in Camera View: entfernt (kein grauer Bereich mehr) */

/* Onboarding-Body über Navigation */
.scan-onboarding .scan-onboarding-body {
    padding-bottom: 110px !important;
}

/* Non-Camera Fullscreen-Container: Platz für Navigation */
.scan-classify-fallback,
.scan-dish-container,
.scan-wine-capture-container,
.scan-price-container,
.scan-recommendations-container,
.scan-recommendation-container,
.scan-bottle-info-container,
.scan-success-popup-overlay {
    padding-bottom: 120px !important;
}

/* ==================================================================
   CAMERA ERROR: Gallery + Retry Buttons
   ================================================================== */
.scan-camera-error-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
    max-width: 260px;
}
.scan-camera-error-actions .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
}
.scan-camera-error-actions .scan-error-retry {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    padding: 6px 12px;
}
.scan-camera-error-actions .scan-error-retry:active {
    color: rgba(255,255,255,0.9);
}

/* ==================================================================
   CLASSIFY FALLBACK: Kompaktes Layout ohne Scrollen
   ================================================================== */
.scan-classify-fallback {
    display: flex;
    flex-direction: column;
    padding: 16px 20px 100px;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
}

/* Top: Thumbnail + Beschreibung nebeneinander */
.scan-classify-fallback-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 20px;
}
.scan-classify-fallback-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.scan-classify-fallback-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scan-classify-fallback-top .scan-classify-fallback-desc {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.5;
    margin: 0;
}

/* Options: 3-Spalten Grid, kompakte Kacheln */
.scan-classify-fallback-options {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    margin: 0 !important;
}
.scan-classify-fallback-options .scan-classify-option {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px;
    padding: 16px 8px !important;
    border-radius: 14px;
    background: var(--card-bg, #fff);
    border: 1.5px solid var(--border-light, #e8e4dd);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    min-height: 0 !important;
    margin: 0 !important;
}
.scan-classify-fallback-options .scan-classify-option:active {
    border-color: var(--gold, #C5A059);
    box-shadow: 0 0 0 2px rgba(197,160,89,0.15);
}
.scan-classify-fallback-options .scan-classify-option-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(197,160,89,0.08);
    color: var(--gold, #C5A059);
    flex-shrink: 0;
}
.scan-classify-fallback-options .scan-classify-option-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    text-align: center;
    line-height: 1.3;
}

/* Retake-Button unten */
.scan-classify-retake {
    margin-top: 20px !important;
    align-self: center;
}

/* Bottle/Wine Prompt: Buttons höher positionieren */
.scan-bottle-prompt-container {
    padding-bottom: max(100px, calc(80px + env(safe-area-inset-bottom))) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: auto;
}
/* Abstand Hint-Text → Buttons auf 1/4 reduzieren (28px → 7px) */
.scan-bottle-prompt-hint {
    margin-bottom: 7px !important;
}
.scan-bottle-prompt-actions {
    padding-top: 8px;
}

/* Price Selection: Range-Anzeige + Slider weiter nach unten */
.scan-price-subtitle {
    margin-bottom: 48px !important;
}
.scan-price-range-display {
    margin-top: 24px !important;
}

/* Bottle Info: Preis-Badge im Header begrenzen */
.scan-bottle-info-container .scan-wine-price-small {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px !important;
}

/* Bottle Info: Marktpreis-Sektion — cleaner layout */
.scan-bottle-price-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.scan-bottle-price-value {
    font-size: 20px !important;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.3;
    margin-top: 2px;
}
.scan-bottle-price-disclaimer {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary, #999);
    font-style: italic;
    margin-top: 2px;
}

/* Gauge: Marktpreis-Range unter der Tacho-Anzeige */
.scan-gauge-price-range {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-tertiary, #888);
    text-align: center;
    margin-top: 6px;
    margin-bottom: 2px;
    line-height: 1.5;
}
.scan-gauge-price-range strong {
    font-weight: 700;
    color: var(--text-secondary, #666);
}
.scan-gauge-price-range small {
    font-size: 9.5px;
    font-weight: 400;
    color: var(--text-tertiary, #999);
}
.scan-gauge-disclaimer-inline {
    font-size: 9px;
    font-style: italic;
    color: var(--text-tertiary, #999);
    opacity: 0.8;
}

/* ==================================================================
   GAUGE: Doppelte Größe (scan-gauge-large)
   ================================================================== */
.scan-gauge-large .scan-gauge-svg {
    width: 260px !important;
    height: 160px !important;
}
.scan-gauge-large .scan-gauge-label {
    font-size: 15px !important;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.3;
    text-align: center;
    padding: 0 4px;
}

/* Restaurant estimate (both bottle info and gauge context) */
.scan-restaurant-estimate {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.08);
}
.scan-restaurant-estimate-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.scan-restaurant-estimate-value {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

/* Gauge: Price block wrapper */
.scan-gauge-price-block {
    text-align: center;
    margin-top: 4px;
}

/* Gauge: Short description under label */
.scan-gauge-short-desc {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--text-secondary, #666);
    text-align: center;
    margin: 2px 0 8px;
    line-height: 1.4;
    font-style: italic;
}

/* Gauge: Info-Button ("Wie bewertet der Tacho?") */
.scan-gauge-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 12px;
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 20px;
    color: var(--gold, #B8960C);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.scan-gauge-info-btn:active {
    background: rgba(197, 160, 89, 0.18);
    border-color: rgba(197, 160, 89, 0.4);
}
.scan-gauge-info-btn svg {
    flex-shrink: 0;
    color: var(--gold, #B8960C);
}

/* Gauge: Expandable detail panel */
.scan-gauge-info-detail {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
    text-align: left;
}
.scan-gauge-info-detail.open {
    max-height: 800px;
    opacity: 1;
    margin-top: 12px;
}

/* Gauge: Detail intro text */
.scan-gauge-info-intro {
    font-size: 11px;
    color: var(--text-secondary, #666);
    line-height: 1.55;
    margin-bottom: 8px;
}
.scan-gauge-info-intro strong {
    font-weight: 600;
    color: var(--text-primary, #333);
}

/* Gauge: Factor table */
.scan-gauge-factor-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 10px;
    font-size: 10.5px;
    line-height: 1.4;
}
.scan-gauge-factor-table tr {
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.scan-gauge-factor-table tr:last-child {
    border-bottom: none;
}
.scan-gauge-factor-table td {
    padding: 3.5px 4px;
    color: var(--text-secondary, #555);
    vertical-align: middle;
}
.scan-gauge-factor-table .factor-dot {
    width: 16px;
    font-size: 12px;
    text-align: center;
    padding-right: 2px;
}
.scan-gauge-factor-table td:nth-child(2) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary, #444);
}
.scan-gauge-factor-table td:nth-child(3) {
    font-weight: 400;
    color: var(--text-tertiary, #777);
}

/* Gauge: Info note (preisklassen-degression) */
.scan-gauge-info-note {
    font-size: 10px;
    color: var(--text-tertiary, #888);
    line-height: 1.55;
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.06);
}

/* Bottle price context (no gauge) */
.scan-bottle-price-context .scan-bottle-price-display {
    text-align: center;
}
.scan-bottle-price-context .scan-restaurant-estimate {
    text-align: center;
}

/* ==================================================================
   RECOMMENDATION PAGE: Header-Buttons entfernt → Content ganz oben
   ================================================================== */
.scan-recommendation-container {
    padding-top: max(12px, env(safe-area-inset-top, 0px)) !important;
}

/* ==================================================================
   WAIT SCREEN: Trivia + Phase Badge ins obere Bildschirm-Drittel
   ================================================================== */

/* Phase badge: direkt über Trivia, deutlich sichtbar */
.scan-wait-header {
    flex-shrink: 0;
    padding: 0 24px;
    padding-top: max(72px, calc(env(safe-area-inset-top, 0px) + 44px));
    padding-bottom: 12px !important;
    text-align: center;
    position: relative;
    z-index: 2;
}

.scan-wait-phase {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--wine-corporate, #722F37);
    letter-spacing: 0.2px;
    text-transform: none;
    pointer-events: none;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    animation: none;
    transition: opacity 0.3s ease;
}

/* Dark mode: helles Gold für Phase-Text */
[data-theme="dark"] .scan-wait-phase {
    color: #F5E6C8;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .scan-wait-phase {
        color: #F5E6C8;
    }
}

/* Flash animation when status changes */
.scan-wait-phase.scan-phase-flash {
    background: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.scan-wait-phase svg {
    width: 14px;
    height: 14px;
    opacity: 0.85;
    animation: scan-phase-icon-pulse 1.5s ease-in-out infinite;
}

@keyframes scan-phase-icon-pulse {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}

@keyframes scan-phase-glow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(197, 160, 89, 0.15), 0 0 16px rgba(197, 160, 89, 0.06);
        border-color: rgba(197, 160, 89, 0.25);
    }
    50% {
        box-shadow: 0 0 16px rgba(197, 160, 89, 0.35), 0 0 32px rgba(197, 160, 89, 0.12);
        border-color: rgba(197, 160, 89, 0.45);
    }
}

/* Overall progress bar: visible start and end */
.scan-wait-overall-progress {
    width: 100%;
    max-width: 240px;
    height: 5px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: visible;
    margin: 16px auto 0;
    position: relative;
}

/* Start dot */
.scan-wait-overall-progress::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold, #C5A059);
    opacity: 0.9;
    box-shadow: 0 0 6px rgba(197, 160, 89, 0.5);
}

/* End dot */
.scan-wait-overall-progress::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1.5px solid rgba(197, 160, 89, 0.45);
}

.scan-wait-overall-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold, #C5A059), var(--gold-light, #D4AF37));
    border-radius: 3px;
    opacity: 1;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.3);
}

/* Subtle shimmer on the progress bar */
.scan-wait-overall-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: scan-progress-shimmer 2s ease-in-out infinite;
}

@keyframes scan-progress-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Zone 2: Trivia + Typewriter nach oben (oberes Drittel) */
.scan-wait-z2 {
    flex: 0 0 auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important;
    padding: 0 22px;
    position: relative;
    z-index: 2;
}

/* ==================================================================
   TYPEWRITER: Weiter nach links
   ================================================================== */
.scan-typewriter-v2 {
    padding-left: 4px !important;
}

/* ==================================================================
   CAMERA: Returning-Hint entfernen ("Einfach scannen...")
   ================================================================== */
.scan-returning-hint {
    display: none !important;
}

/* ==================================================================
   VIEWFINDER: Untere Ecken minimal nach oben
   ================================================================== */
.scan-viewfinder-corner.bottom-left,
.scan-viewfinder-corner.bottom-right {
    bottom: 14px !important;
}

/* Wait Screen: Typewriter ist jetzt innerhalb z2 → kein Extra-Padding nötig */


/* ==================================================================
   VIEWFINDER HINT: Groß, Playfair, Glasmorphismus
   ================================================================== */
.scan-viewfinder-hint {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    padding: 22px 32px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 22px !important;
    line-height: 1.5 !important;
    max-width: 88% !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    color: #fff;
}

/* Hint versteckt während Onboarding */
.scan-viewfinder-hint.hidden-by-onboarding {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Hide gallery button and viewfinder hint when onboarding overlay is active */
.scan-camera-container:has(.scan-onboarding.active) .scan-camera-gallery {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scan-camera-container:has(.scan-onboarding.active) .scan-viewfinder-hint {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Hint einblenden nach Onboarding-Dismiss */
.scan-viewfinder-hint.fade-in-hint {
    animation: scan-hint-fade-in 0.8s ease 0.4s both;
}
@keyframes scan-hint-fade-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}


/* ==================================================================
   FOOD QUESTION v2 — Zentriert wie Viewfinder-Hint Position
   ================================================================== */
.scan-food-question-v2 {
    min-height: 100vh;
    background: var(--bg-primary, #fafafa);
    display: flex;
    flex-direction: column;
}

.scan-fq-topbar {
    padding: 16px 20px;
    padding-top: max(16px, env(safe-area-inset-top));
    flex-shrink: 0;
}

.scan-fq-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 28px;
    /* Zentrierung = etwas unterhalb der Viewfinder-Hint-Position */
    padding-bottom: 160px;
}

.scan-food-question-v2 .scan-food-question-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(114, 47, 55, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #722F37);
    margin-bottom: 18px;
}

.scan-food-question-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 10px 0;
    text-align: center;
}

.scan-food-question-v2 .scan-food-question-text {
    font-size: 17px;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 320px;
}

.scan-fq-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}

.scan-food-question-v2 .scan-food-question-yes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
}

.scan-food-question-v2 .scan-food-question-no {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
}

/* Dark Mode */
[data-theme="dark"] .scan-food-question-v2 {
    background: var(--bg-primary, #111827);
}

[data-theme="dark"] .scan-food-question-heading,
[data-theme="dark"] .scan-food-question-v2 .scan-food-question-text {
    color: var(--text-primary, #F9FAFB);
}

[data-theme="dark"] .scan-food-question-v2 .scan-food-question-icon {
    background: rgba(114, 47, 55, 0.15);
}


/* ==================================================================
   CLASSIFY v2 — „Bild wird erkannt" Redesign
   Zentriert, Journal-Aesthetic, Gold-Spinner
   ================================================================== */

.scan-classify-v2 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary, #FAFAF5);
    padding: 40px 24px;
    /* Text muss auf gleicher Höhe wie Viewfinder-Hint auf Wine-Capture sein.
       Sichtbarer Bereich: ~150px Header bis ~100px Nav = ~600px sichtbar
       Zentrum bei ~450px von unten → padding-bottom = 450 - 300 = 150px
       Muss höher als default center → großes padding-bottom */
    padding-bottom: 200px;
}

.scan-classify-v2-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.scan-classify-v2-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-classify-v2-icon svg {
    animation: scan-classify-breathe 2.4s ease-in-out infinite;
}

.scan-classify-v2-arc {
    animation: scan-classify-spin 1.8s linear infinite;
    transform-origin: center;
}

@keyframes scan-classify-spin {
    to { stroke-dashoffset: -38; }
}

@keyframes scan-classify-breathe {
    0%, 100% { opacity: 0.7; transform: scale(0.95); }
    50%      { opacity: 1; transform: scale(1.05); }
}

.scan-classify-v2-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #111827);
    margin: 0;
    text-align: center;
}

/* Dark Mode */
[data-theme="dark"] .scan-classify-v2 {
    background: var(--bg-primary, #111827);
}

[data-theme="dark"] .scan-food-question-heading {
    color: var(--text-primary, #F9FAFB);
}


/* ==================================================================
   CAMERA INSTRUCTION CARD: Prominent direction overlay on viewfinder
   ================================================================== */
.scan-camera-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(30, 30, 30, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 28px 32px 24px;
    text-align: center;
    max-width: 260px;
    width: 80%;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: auto;
    cursor: pointer;
}

.scan-camera-instruction.dismissed {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    pointer-events: none;
}

.scan-camera-instruction-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.15);
    margin: 0 auto 14px;
    color: var(--gold, #C5A059);
}

.scan-camera-instruction-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: #F9FAFB;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.scan-camera-instruction-text strong {
    color: var(--gold-light, #D4AF37);
}

.scan-camera-instruction-sub {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    margin: 0;
}


/* ==================================================================
   RESPONSIVE ADJUSTMENTS
   ================================================================== */

/* Very small devices */
@media (max-height: 640px) {
    .scan-onb-title { font-size: 28px; }
    .scan-onb-subtitle { font-size: 17px; }
    .scan-onb-banner-slide { font-size: 14px; }
    .scan-onb-cta-button { padding: 12px; font-size: 13px; }
    
    .scan-trivia-title { font-size: 16px; }
    .scan-trivia-body { font-size: 13px; }
    .scan-tw-line { font-size: 11.5px; }
    .scan-typewriter-v2 { padding-left: 2px !important; }
    
    .scan-camera-instruction { padding: 20px 24px 18px; }
    .scan-camera-instruction-text { font-size: 17px; }
    .scan-camera-instruction-icon { width: 44px; height: 44px; margin-bottom: 10px; }
    .scan-camera-instruction-icon svg { width: 26px; height: 26px; }
}

/* Small width */
@media (max-width: 340px) {
    .scan-onb-title { font-size: 26px; }
    .scan-onb-subtitle { font-size: 16px; }
}


/* ==================================================================
   MARKTPREIS-ABSCHÄTZUNG: Größerer Heading
   ================================================================== */
.scan-price-heading {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 4px;
}

.scan-gauge-price-range .scan-price-heading {
    font-size: 13px;
    color: var(--text-primary, #444);
    margin-bottom: 2px;
}

[data-theme="dark"] .scan-price-heading {
    color: var(--text-primary, #F9FAFB);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .scan-price-heading {
        color: var(--text-primary, #F9FAFB);
    }
}


/* ==================================================================
   QUESTIONNAIRE CTA: Kleiner Button im taste_match Abschnitt
   ================================================================== */
.scan-questionnaire-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 14px;
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.22);
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gold, #C5A059);
    cursor: pointer;
    transition: all 0.2s ease;
}

.scan-questionnaire-cta:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: var(--gold, #C5A059);
}

.scan-questionnaire-cta:active {
    transform: scale(0.97);
}

.scan-questionnaire-cta svg:first-child {
    flex-shrink: 0;
    opacity: 0.8;
}

.scan-questionnaire-cta svg:last-child {
    flex-shrink: 0;
    opacity: 0.5;
}

[data-theme="dark"] .scan-questionnaire-cta {
    background: rgba(197, 160, 89, 0.12);
    border-color: rgba(197, 160, 89, 0.28);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .scan-questionnaire-cta {
        background: rgba(197, 160, 89, 0.12);
        border-color: rgba(197, 160, 89, 0.28);
    }
}


/* ==================================================================
   WAIT SCREEN: Phase text inline transition
   ================================================================== */
#scan-wait-phase-text {
    display: inline-block;
}


/* ==================================================================
   VIDEO WAIT SCREEN
   Replaces Ink-Bleed + Trivia with fullscreen video background,
   overlay texts, and loading ring.
   Active when .scan-wait-video-mode is on the container.
   ================================================================== */


/* ---- Basis: Schwarzer Hintergrund für Video ---- */
.scan-wait-screen.scan-wait-video-mode {
    background: #0a0a0a;
}


/* ---- Ink-Blobs im Video-Modus ausblenden ---- */
.scan-wait-video-mode .scan-wait-ink {
    display: none;
}


/* ---- Trivia-Card im Video-Modus ausblenden ---- */
.scan-wait-video-mode .scan-trivia-card,
.scan-wait-video-mode .scan-wait-z2 {
    display: none;
}


/* ---- Video Container: Zwei übereinanderliegende Videos ---- */

.scan-wait-video-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #000;
}

.scan-wait-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    pointer-events: none;
    transform: scale(1.02);
}

.scan-wait-video.active {
    opacity: 1;
}


/* ---- Gradient Overlays (Lesbarkeit über Video) ---- */

.scan-wait-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.40) 50%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

.scan-wait-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.80) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}


/* ---- Header im Video-Modus: weiß auf dunkel ---- */

.scan-wait-video-mode .scan-wait-header {
    z-index: 3;
}

.scan-wait-video-mode .scan-wait-phase {
    color: rgba(255, 255, 255, 0.85);
}

.scan-wait-video-mode .scan-wait-phase svg {
    stroke: rgba(212, 175, 55, 0.9);
    opacity: 1;
}

.scan-wait-video-mode .scan-wait-overall-progress {
    background: rgba(255, 255, 255, 0.15);
}

.scan-wait-video-mode .scan-wait-overall-progress::before {
    background: var(--gold, #C5A059);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.scan-wait-video-mode .scan-wait-overall-progress::after {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.scan-wait-video-mode .scan-wait-overall-bar {
    background: linear-gradient(90deg, #C5A059, #D4AF37);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}


/* ---- Center: Overlay-Text + Loading Ring ---- */

.scan-wait-overlay-center {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}

.scan-wait-overlay-text {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    max-width: 320px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scan-wait-overlay-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.scan-wait-loading-ring {
    position: absolute;
    top: 31%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    opacity: 0.6;
    z-index: 3;
}

.scan-wait-loading-ring svg {
    width: 100%;
    height: 100%;
}


/* ---- Bottom: Typewriter im Video-Modus ---- */

.scan-wait-z3-video {
    position: absolute;
    bottom: 18%;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 0 24px;
    background: none;
}

.scan-wait-video-mode .scan-typewriter-v2 {
    padding-left: 0;
    align-items: center;
}

.scan-wait-video-mode .scan-tw-line {
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    text-align: center;
    justify-content: center;
}

.scan-wait-video-mode .scan-tw-line.done {
    opacity: 0.4;
}

.scan-wait-video-mode .scan-tw-cursor {
    background: var(--gold, #C5A059);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

.scan-wait-video-mode .scan-tw-check {
    color: var(--gold-light, #D4AF37);
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
}


/* ---- Flash: Phase-Badge im Video-Modus ---- */

.scan-wait-video-mode .scan-wait-phase.scan-phase-flash {
    opacity: 0.5;
    background: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}


/* ---- Responsive: Video Wait Screen ---- */

@media (max-height: 600px) {
    .scan-wait-overlay-text {
        font-size: 18px;
    }
    .scan-wait-loading-ring {
        width: 90px;
        height: 90px;
    }
    .scan-wait-z3-video {
        bottom: 14%;
    }
}

@media (min-height: 800px) {
    .scan-wait-overlay-text {
        font-size: 24px;
        max-width: 340px;
    }
}
