/* ============================================
   IMPRINT VIRTUAL — Virtual Booth Theme
   Glassmorphic / holographic / neon waves
   Covers: form page, capture, playback, processing
   ============================================ */

/* --- Root tokens --- */
:root {
    --qr-bg-color: #0a0418;
    --qr-text-color: #ffffff;
    --qr-text-font-family: "Raleway", sans-serif;
    --qr-text-font-size: 15px;

    --imprint-purple: #7B2CBF;
    --imprint-magenta: #C026D3;
    --imprint-cyan: #22D3EE;
    --imprint-blue: #4F46E5;
    --imprint-glass-border: rgba(180, 140, 255, 0.35);

    --bs-body-bg: var(--qr-bg-color);
    --bs-body-color: var(--qr-text-color);
    --bs-link-color: var(--imprint-cyan);
    --bs-body-font-family: var(--qr-text-font-family);
    --bs-body-font-size: var(--qr-text-font-size);
    --bs-border-color: var(--imprint-glass-border);
}

/* ============================================
   ANIMATED HOLOGRAPHIC BACKGROUND
   ============================================ */
html, body {
    min-height: 100vh;
}

body {
    background:
        url("https://d.photobooth.co/Breeze/Scripts/Imprint/assets/background.png") no-repeat bottom right / cover,
        radial-gradient(ellipse at 15% 10%, rgba(123, 44, 191, 0.55) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 90%, rgba(34, 211, 238, 0.30) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(192, 38, 211, 0.18) 0%, transparent 60%),
        linear-gradient(135deg, #0a0418 0%, #1a0a3e 50%, #0a0418 100%);
    background-attachment: fixed, fixed, fixed, fixed, fixed;
    min-height: 100vh;
    color: #ffffff;
    font-family: "Raleway", sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* Vignette overlay for content readability */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 4, 24, 0.35) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Sparkle layer */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 20%, white 0.5px, transparent 1.5px),
        radial-gradient(circle at 88% 75%, white 0.5px, transparent 1.5px),
        radial-gradient(circle at 65% 35%, white 0.5px, transparent 1px),
        radial-gradient(circle at 25% 80%, white 0.5px, transparent 1.5px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
    animation: imprint-sparkle 6s ease-in-out infinite alternate;
}

@keyframes imprint-sparkle {
    from { opacity: 0.3; }
    to   { opacity: 0.8; }
}

.qr-page { position: relative; z-index: 1; }

/* ============================================
   LAYOUT — vertical centering + horizontal alignment
   ============================================ */
.qr-page.wrapper {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
}

.qr-page > .flex-grow-1 {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    width: 100%;
}

.qr-page .header {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
    background: transparent !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    padding-top: 1rem !important;
}

.qr-page > .flex-grow-1 > .max-width {
    width: 100%;
    max-width: 520px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1.25rem;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.qr-page .footer {
    flex: 0 0 auto;
    margin-top: 0 !important;
}

#virtual-booth {
    width: 100%;
    max-width: 520px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 1.25rem;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER LOGO
   ============================================ */
.qr-logo {
    max-height: 64px !important;
    filter: drop-shadow(0 0 12px rgba(192, 38, 211, 0.5));
}

/* ============================================
   FORM PAGE — glass card
   ============================================ */
.qr-form {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    background: linear-gradient(145deg, rgba(123, 44, 191, 0.18), rgba(34, 211, 238, 0.08));
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--imprint-glass-border);
    border-radius: 24px;
    padding: 2.25rem 1.75rem 1.75rem;
    box-shadow:
        0 8px 32px rgba(10, 4, 24, 0.6),
        0 0 60px rgba(123, 44, 191, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.qr-form::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--imprint-cyan), var(--imprint-magenta), transparent);
    opacity: 0.7;
}

.qr-form::after {
    content: "✦";
    position: absolute; top: 14px; right: 18px;
    font-size: 18px; color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 0 10px var(--imprint-cyan);
    animation: imprint-twinkle 3s ease-in-out infinite;
}

@keyframes imprint-twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
    50%      { opacity: 1;   transform: scale(1.15) rotate(45deg); }
}

/* Each form row respects parent width */
.qr-form .mb-3 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Form labels — Raleway uppercase */
.form-label,
.form-label p {
    color: #ffffff;
    font-family: "Raleway", sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.6rem !important;
    opacity: 0.9;
}

/* Inputs & selects */
.form-control,
.form-select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(10, 4, 24, 0.5) !important;
    border: 1px solid rgba(180, 140, 255, 0.3) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    padding: 0.85rem 1rem !important;
    font-family: "Raleway", sans-serif !important;
    font-size: 15px !important;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(192, 38, 211, 0.5) !important;
    background: rgba(10, 4, 24, 0.65) !important;
}

.form-control:focus,
.form-select:focus {
    outline: none !important;
    border-color: var(--imprint-cyan) !important;
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.15),
        0 0 20px rgba(192, 38, 211, 0.25) !important;
    background: rgba(10, 4, 24, 0.75) !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
    font-style: italic;
}

/* Selects truncate long options when closed */
.form-select {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* But options wrap when dropdown is open */
.form-select option {
    background: #1a0a3e;
    color: #ffffff;
    padding: 8px;
    font-family: "Raleway", sans-serif;
    white-space: normal;
    word-wrap: break-word;
}

/* Safari/Chrome autofill — kill the yellow background */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active,
.form-select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(10, 4, 24, 0.85) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    border: 1px solid rgba(180, 140, 255, 0.3) !important;
    transition: background-color 9999s ease-in-out 0s !important;
}

/* Submit / Next button (text buttons on form page) */
.submit-button,
.submit-button:active,
.submit-button:focus-visible,
.submit-button:hover {
    background: linear-gradient(135deg, var(--imprint-purple) 0%, var(--imprint-magenta) 50%, var(--imprint-blue) 100%) !important;
    background-size: 200% 200% !important;
    border: none !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-family: "Raleway", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.25em !important;
    text-transform: uppercase !important;
    padding: 0.95rem 2.5rem !important;
    margin-top: 1.5rem !important;
    box-shadow:
        0 4px 20px rgba(123, 44, 191, 0.4),
        0 0 30px rgba(192, 38, 211, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    transform: translateY(-2px);
    background-position: 100% 100% !important;
    box-shadow:
        0 6px 28px rgba(192, 38, 211, 0.55),
        0 0 40px rgba(34, 211, 238, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.submit-button::after {
    content: "";
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.submit-button:hover::after { left: 100%; }

/* ============================================
   CAPTURE PAGE — video frame
   ============================================ */
.virtual-booth-form {
    padding: 1rem 0;
}

.video-wrapper {
    background: linear-gradient(145deg, rgba(123, 44, 191, 0.25), rgba(34, 211, 238, 0.12)) !important;
    border: 1px solid var(--imprint-glass-border);
    border-radius: 24px !important;
    padding: 14px;
    box-shadow:
        0 12px 40px rgba(10, 4, 24, 0.7),
        0 0 80px rgba(123, 44, 191, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    width: 100% !important;
    max-width: 420px;
    margin: 0 auto 2rem !important;
    overflow: visible !important;
}

/* Hide wrapper when its video child is hidden (playback / processing states) */
.video-wrapper:has(video[style*="display: none"]),
.video-wrapper:has(video[style*="display:none"]) {
    display: none !important;
}

.video-wrapper::before {
    content: "";
    position: absolute;
    top: 0; left: 8%; right: 8%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--imprint-cyan), var(--imprint-magenta), transparent);
    opacity: 0.8;
}

.video-wrapper::after {
    content: "✦";
    position: absolute;
    top: -4px; left: 12px;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow:
        0 0 10px var(--imprint-cyan),
        0 0 20px var(--imprint-magenta);
    animation: imprint-twinkle 3s ease-in-out infinite;
    pointer-events: none;
}

.video-wrapper video {
    background: #000;
    display: block;
    border-radius: 18px;
}

/* Captured photo preview */
#photo {
    border-radius: 18px;
    border: 1px solid var(--imprint-glass-border);
    box-shadow:
        0 12px 40px rgba(10, 4, 24, 0.7),
        0 0 60px rgba(123, 44, 191, 0.25);
    max-width: 420px;
    width: 100%;
    margin: 0 auto 2rem !important;
    display: block;
}

/* Countdown overlay */
.video-wrapper .vb-countdown {
    background: radial-gradient(circle at center, rgba(10, 4, 24, 0.55) 0%, transparent 70%);
    border-radius: 18px;
}

.video-wrapper .vb-countdown-number {
    font-family: "Raleway", sans-serif !important;
    font-size: 140px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: transparent !important;
    text-shadow:
        0 0 20px var(--imprint-cyan),
        0 0 40px var(--imprint-magenta),
        0 0 60px var(--imprint-purple);
    letter-spacing: -0.05em;
}

/* ============================================
   ACTION BUTTONS — capture / recapture / submit
   ============================================ */
.action-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
    width: 100%;
    margin: 0.5rem 0 1.5rem !important;
    padding: 0;
    min-height: 84px;
}

.action-buttons button {
    margin: 0 !important;
    width: 84px;
    height: 84px;
    border-radius: 50% !important;
    transition: all 0.3s ease;
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    flex-shrink: 0;
    line-height: 0 !important;
    vertical-align: middle;
}

.action-buttons button:not([style*="display: none"]):not([style*="display:none"]) {
    display: inline-flex !important;
}

.action-buttons button i {
    display: none !important;
}

/* SVG icons */
.vb-capture-btn::before {
    content: "";
    width: 36px;
    height: 36px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><circle cx='12' cy='12' r='3.5' fill='white'/></svg>") no-repeat center / contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

.vb-recapture-btn::before {
    content: "";
    width: 32px;
    height: 32px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 1 0 3-6.7L3 8'/><path d='M3 3v5h5'/></svg>") no-repeat center / contain;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.vb-submit-btn::before {
    content: "";
    width: 36px;
    height: 36px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 12 10 18 20 6'/></svg>") no-repeat center / contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
}

/* Capture — primary, magenta gradient with pulse */
.vb-capture-btn {
    background: linear-gradient(135deg, var(--imprint-magenta), var(--imprint-purple)) !important;
    box-shadow:
        0 4px 20px rgba(192, 38, 211, 0.5),
        0 0 30px rgba(123, 44, 191, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: imprint-pulse 2.5s ease-in-out infinite;
}

.vb-capture-btn:hover {
    background: linear-gradient(135deg, var(--imprint-magenta), var(--imprint-blue)) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 30px rgba(192, 38, 211, 0.7),
        0 0 50px rgba(34, 211, 238, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.vb-capture-btn:disabled {
    opacity: 0.5;
    animation: none;
    cursor: not-allowed;
}

@keyframes imprint-pulse {
    0%, 100% {
        box-shadow:
            0 4px 20px rgba(192, 38, 211, 0.5),
            0 0 30px rgba(123, 44, 191, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
    50% {
        box-shadow:
            0 4px 20px rgba(192, 38, 211, 0.7),
            0 0 50px rgba(192, 38, 211, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Recapture — secondary glass */
.vb-recapture-btn {
    background: rgba(10, 4, 24, 0.6) !important;
    border: 1px solid rgba(180, 140, 255, 0.4) !important;
    backdrop-filter: blur(10px);
    box-shadow:
        0 4px 16px rgba(10, 4, 24, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vb-recapture-btn:hover {
    background: rgba(123, 44, 191, 0.3) !important;
    border-color: rgba(192, 38, 211, 0.6) !important;
    transform: translateY(-3px) scale(1.05) rotate(-15deg);
}

/* Submit — confirmation cyan/blue */
.vb-submit-btn {
    background: linear-gradient(135deg, var(--imprint-cyan), var(--imprint-blue)) !important;
    box-shadow:
        0 4px 20px rgba(34, 211, 238, 0.5),
        0 0 30px rgba(79, 70, 229, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.vb-submit-btn:hover {
    background: linear-gradient(135deg, var(--imprint-cyan), var(--imprint-magenta)) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 30px rgba(34, 211, 238, 0.7),
        0 0 50px rgba(192, 38, 211, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* ============================================
   PROCESSING / PRELOADER SCREEN
   ============================================ */
#preloader {
    background: linear-gradient(145deg, rgba(123, 44, 191, 0.18), rgba(34, 211, 238, 0.08));
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--imprint-glass-border);
    border-radius: 24px;
    padding: 2.5rem 1.75rem !important;
    box-shadow:
        0 8px 32px rgba(10, 4, 24, 0.6),
        0 0 60px rgba(123, 44, 191, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 420px;
    margin: 0 auto !important;
    position: relative;
    overflow: hidden;
    animation: imprint-card-glow 3s ease-in-out infinite;
}

#preloader::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--imprint-cyan), var(--imprint-magenta), transparent);
    opacity: 0.7;
}

#preloader > img {
    display: none !important;
}

#preloader::after {
    content: "";
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, var(--imprint-cyan) 90deg, var(--imprint-magenta) 180deg, var(--imprint-purple) 270deg, transparent 360deg);
    mask: radial-gradient(circle, transparent 28px, black 30px);
    -webkit-mask: radial-gradient(circle, transparent 28px, black 30px);
    margin-bottom: 1.5rem;
    animation: imprint-spin 1.2s linear infinite;
    filter: drop-shadow(0 0 12px rgba(192, 38, 211, 0.6));
    order: -1;
}

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

@keyframes imprint-card-glow {
    0%, 100% {
        box-shadow:
            0 8px 32px rgba(10, 4, 24, 0.6),
            0 0 60px rgba(123, 44, 191, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 8px 32px rgba(10, 4, 24, 0.6),
            0 0 80px rgba(192, 38, 211, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

#preloader .loading-text {
    color: #ffffff !important;
    font-family: "Raleway", sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.6;
    opacity: 0.9;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: transparent !important;
    border-top: 1px solid rgba(180, 140, 255, 0.15);
    margin-top: 2rem;
}

.footer-content,
.footer-content a,
.footer-content p {
    color: rgba(255, 255, 255, 0.5) !important;
    font-family: "Raleway", sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ============================================
   MOBILE — ≤520px
   ============================================ */
@media (max-width: 520px) {
    .qr-page > .flex-grow-1 > .max-width,
    #virtual-booth {
        padding: 0 1rem;
    }

    .qr-form {
        padding: 1.5rem 1.1rem 1.25rem !important;
        border-radius: 18px;
    }

    .form-control,
    .form-select {
        padding: 0.75rem 0.85rem !important;
        font-size: 14px !important;
    }

    .form-select {
        padding-right: 2.5rem !important;
    }

    .form-label,
    .form-label p {
        font-size: 11px !important;
    }

    .submit-button {
        width: 100%;
        padding: 0.95rem 1rem !important;
    }

    #preloader {
        padding: 1.75rem 1.25rem !important;
        border-radius: 20px;
    }

    .video-wrapper {
        margin: 0 auto 2rem !important;
    }

    .action-buttons {
        gap: 1.25rem !important;
        min-height: 72px;
    }

    .action-buttons button {
        width: 72px;
        height: 72px;
    }

    .vb-capture-btn::before,
    .vb-submit-btn::before {
        width: 30px;
        height: 30px;
    }

    .vb-recapture-btn::before {
        width: 26px;
        height: 26px;
    }

    .video-wrapper .vb-countdown-number {
        font-size: 100px !important;
    }

    /* Wave background — anchor differently on mobile */
    body {
        background-position:
            center bottom,
            15% 10%,
            85% 90%,
            50% 50%,
            0 0;
        background-size:
            140% auto,
            100% 100%,
            100% 100%,
            100% 100%,
            100% 100%;
    }
}

/* ============================================
   MOBILE — ≤380px (narrow phones)
   ============================================ */
@media (max-width: 380px) {
    .qr-page > .flex-grow-1 > .max-width,
    #virtual-booth {
        padding: 0 0.85rem;
    }

    .qr-form {
        padding: 1.25rem 0.95rem 1rem !important;
        border-radius: 16px;
    }

    .form-control,
    .form-select {
        font-size: 13px !important;
        padding: 0.7rem 0.75rem !important;
    }

    .form-select {
        padding-right: 2.25rem !important;
    }

    .submit-button {
        padding: 0.85rem 1rem !important;
        font-size: 12px !important;
        letter-spacing: 0.2em !important;
    }
}.qr-logo {
    max-height: 90px !important;
    filter: drop-shadow(0 0 12px rgba(192, 38, 211, 0.5));
}