/* ===== Acorn Street Photo Booth — Theme ===== */

:root {
    --brick: #8B3A3A;
    --brick-light: #A0524D;
    --cobblestone: #A8A098;
    --iron: #2B2B2B;
    --parchment: #FBF7F0;
    --gold: #C8A44E;
    --gold-light: #DAB866;
    --ivy: #5B7346;
    --white: #FEFCF8;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: var(--parchment);
    color: var(--iron);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 1rem;
}

/* ---- Cobblestone Background Pattern ---- */
.cobblestone-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.07;
    background:
        radial-gradient(ellipse at 20% 50%, var(--iron) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 20%, var(--iron) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 40%, var(--iron) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 70%, var(--iron) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, var(--iron) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 70%, var(--iron) 0%, transparent 50%);
    background-color: var(--parchment);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* ---- Header ---- */
.header {
    text-align: center;
}

.lamp-icon {
    color: var(--gold);
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    position: relative;
}

.lamp-icon svg {
    width: 100%;
    height: 100%;
}

.lamp-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
    opacity: 0.3;
    animation: glow-pulse 2s ease-in-out infinite;
}

.lamp-icon.flicker .lamp-glow {
    animation: flicker-glow 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

@keyframes flicker-glow {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    25% { opacity: 0.35; transform: scale(1.05); }
    30% { opacity: 0.15; transform: scale(0.98); }
    33% { opacity: 0.40; transform: scale(1.04); }
    45% { opacity: 0.25; transform: scale(1); }
    70% { opacity: 0.10; transform: scale(0.97); }
    72% { opacity: 0.45; transform: scale(1.06); }
    80% { opacity: 0.25; transform: scale(1.01); }
}

.header h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--iron);
    letter-spacing: 0.02em;
}

.header h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--brick);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: -0.3rem;
}

.tagline {
    color: var(--cobblestone);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* ---- Card ---- */
.card {
    width: 100%;
    border: 2px solid var(--brick);
    border-radius: 4px;
    box-shadow:
        0 4px 6px rgba(43, 43, 43, 0.15),
        inset 0 0 0 1px var(--gold);
    background: var(--white);
    position: relative;
}

.card::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid var(--gold);
    border-radius: 2px;
    opacity: 0.3;
    pointer-events: none;
}

.card-inner {
    padding: 2rem 2rem 2.5rem;
}

.card-inner h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.4rem;
    color: var(--iron);
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: var(--cobblestone);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.disclaimer {
    color: var(--cobblestone);
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
    margin-top: 0.75rem;
}

/* ---- Form ---- */
.join-form label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cobblestone);
    margin-bottom: 0.4rem;
}

.join-form input[type="email"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--cobblestone);
    border-radius: 3px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    background: var(--parchment);
    color: var(--iron);
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.join-form input[type="email"]:focus {
    outline: none;
    border-color: var(--brick);
    box-shadow: 0 0 0 3px rgba(139, 58, 58, 0.1);
}

/* ---- Buttons ---- */
.btn-primary,
.btn-capture {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: 2px solid var(--gold);
    background: var(--iron);
    color: var(--white);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.btn-primary:hover,
.btn-capture:hover {
    background: #3D3D3D;
    border-color: var(--gold-light);
}

.btn-primary:active,
.btn-capture:active {
    transform: scale(0.98);
}

.btn-capture {
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
}

.btn-capture:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary svg,
.btn-capture svg {
    flex-shrink: 0;
}

/* ---- Error ---- */
.error-msg {
    background: #FDF2F2;
    border: 1px solid #E5B8B8;
    color: var(--brick);
    padding: 0.75rem 1rem;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ---- Queue Position Plaque ---- */
.position-plaque {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--parchment);
    border: 1px solid var(--cobblestone);
    border-radius: 3px;
}

.position-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--cobblestone);
}

.position-number {
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--iron);
    line-height: 1.1;
    margin: 0.2rem 0;
}

.progress-text {
    text-align: center;
    color: var(--cobblestone);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.queue-bar {
    width: 100%;
    height: 4px;
    background: var(--parchment);
    border-radius: 2px;
    overflow: hidden;
}

.queue-bar-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 100%;
}

/* ---- Camera Frame ---- */
.camera-frame {
    margin: 1rem 0;
    border: 8px solid var(--white);
    outline: 1px solid var(--cobblestone);
    outline-offset: -1px;
    box-shadow:
        0 0 0 2px var(--white),
        0 0 0 3px var(--cobblestone),
        0 4px 12px rgba(43, 43, 43, 0.2);
    border-radius: 2px;
    overflow: hidden;
    background: var(--iron);
    aspect-ratio: 3 / 4;
}

.camera-frame img,
.camera-frame canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timer-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    color: var(--brick);
    margin-bottom: 0.5rem;
}

.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: var(--cobblestone);
    transition: color 0.2s;
}

.info-icon:hover {
    color: var(--gold);
}

.info-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: var(--iron);
    color: var(--white);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 0.65rem 0.85rem;
    border-radius: 4px;
    border: 1px solid var(--gold);
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.info-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--iron);
}

.info-icon:hover .info-tooltip {
    display: block;
}

.capture-status {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    min-height: 1.5rem;
}

.capture-status.error {
    color: var(--brick);
}

/* ---- Thanks Card ---- */
.thanks-card {
    text-align: center;
}

.success-icon,
.timeout-icon {
    color: var(--ivy);
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
}

.timeout-icon {
    color: var(--gold);
}

.success-icon svg,
.timeout-icon svg {
    width: 100%;
    height: 100%;
}

.thanks-card h3 {
    font-size: 1.5rem;
}

.spam-disclaimer {
    color: var(--cobblestone);
    font-size: 0.8rem;
    font-style: italic;
    margin-top: -0.75rem;
    margin-bottom: 1.5rem;
}

.thanks-card .btn-primary {
    margin-top: 1.5rem;
    width: auto;
    padding: 0.85rem 2rem;
}

/* ---- Footer ---- */
footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--cobblestone);
    font-style: italic;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .card-inner {
        padding: 1.5rem 1.25rem 2rem;
    }

    .header h1 {
        font-size: 1.7rem;
    }

    .camera-frame {
        border-width: 5px;
    }

    .position-number {
        font-size: 3rem;
    }
}
