/* =======================================================================
   Australian Weathercam Network — Memorial Camera Wall
   Shared layout & overlay styles for Wall + Grid modes
   ======================================================================= */

/* ── Full-bleed immersive layout ───────────────────────────────────────── */

body.variant-wall,
body.variant-grid {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #080808;
    position: relative;
}

/* Hide the standard header when a variant is active */
body.variant-wall #site-header,
body.variant-grid #site-header {
    display: none;
}

/* Static wall hides the live grid */
body.variant-wall #camera-wall {
    display: none;
}

/* ── Overlay text panel ────────────────────────────────────────────────── */

#overlay-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    text-align: center;
    box-sizing: border-box;

    /* Frosted glass */
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);

    /* Soft edges */
    border: 1px solid rgba(255, 160, 60, 0.10);
    border-radius: 20px;

    /* Layered shadow for depth */
    box-shadow:
        0 0 100px rgba(255, 107, 0, 0.06),
        0 32px 64px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* Sizing — constrained to never overflow */
    max-width: 840px;
    width: min(90vw, 840px);
    padding: 48px 52px 40px;
}

/* Decorative warm accent line across top */
#overlay-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 160, 60, 0.35),
        rgba(255, 200, 100, 0.5),
        rgba(255, 160, 60, 0.35),
        transparent
    );
    border-radius: 1px;
}

/* Subtle bottom accent */
#overlay-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 160, 60, 0.18),
        transparent
    );
}

/* Title */
#overlay-text h1 {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-weight: 800;
    font-size: clamp(1.1rem, 3.8vw, 2.1rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.1;
    color: #fff;
    white-space: nowrap;
    text-shadow:
        0 2px 16px rgba(0, 0, 0, 0.7),
        0 0 48px rgba(255, 107, 0, 0.15);
    margin: 0 0 10px;
}

/* Year range */
#overlay-text .year {
    font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    font-weight: 600;
    font-size: clamp(0.85rem, 1.8vw, 1.4rem);
    letter-spacing: 0.2em;
    white-space: nowrap;
    color: #ff9a3c;
    text-shadow: 0 0 28px rgba(255, 107, 0, 0.35);
    margin: 0 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 160, 60, 0.12);
}

/* Tribute paragraph */
#overlay-text .tribute {
    font-family: 'Barlow', system-ui, -apple-system, sans-serif;
    font-size: clamp(0.74rem, 1.05vw, 0.88rem);
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    text-align: justify;
    max-width: 600px;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Spacing between tribute paragraphs */
#overlay-text .tribute + .tribute {
    margin-top: 12px;
}

/* CTA paragraph — extra spacing above */
#overlay-text .tribute.cta {
    margin-top: 16px;
    pointer-events: auto;
}

#overlay-text .tribute a {
    color: #ff9a3c;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 160, 60, 0.3);
    transition: border-color 0.2s ease;
}

#overlay-text .tribute a:hover {
    border-color: #ff9a3c;
}

/* ── Responsive — tablet ───────────────────────────────────────────────── */

@media (max-width: 900px) {
    #overlay-text {
        padding: 40px 36px 32px;
        border-radius: 16px;
    }
}

/* ── Responsive — mobile (single smooth scale for all <600px) ──────────── */

@media (max-width: 600px) {
    #overlay-text {
        padding: 20px 14px 16px;
        border-radius: 14px;
        width: 94vw;
        max-height: 92vh;
        overflow-y: auto;
    }

    #overlay-text h1 {
        font-size: 3.8vw;
        letter-spacing: 0;
        margin-bottom: 6px;
    }

    #overlay-text .year {
        font-size: clamp(0.6rem, 2.8vw, 0.95rem);
        letter-spacing: 0.06em;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    #overlay-text .tribute {
        font-size: clamp(0.6rem, 2.4vw, 0.78rem);
        line-height: 1.55;
        text-align: left;
    }

    #overlay-text .tribute + .tribute {
        margin-top: 8px;
    }

    #overlay-text .tribute.cta {
        font-size: clamp(0.6rem, 2.4vw, 0.78rem);
        margin-top: 10px;
        text-align: left;
    }

    #overlay-text::after {
        display: none;
    }
}

/* ── Responsive — very small screens ─────────────────────────────────────── */

@media (max-width: 380px) {
    #overlay-text {
        padding: 16px 12px 14px;
        width: 96vw;
        max-height: 94vh;
    }

    #overlay-text h1 {
        font-size: 3.6vw;
        margin-bottom: 4px;
    }

    #overlay-text .year {
        font-size: clamp(0.55rem, 2.6vw, 0.85rem);
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    #overlay-text .tribute {
        font-size: clamp(0.55rem, 2.2vw, 0.72rem);
        line-height: 1.5;
    }

    #overlay-text .tribute.cta {
        font-size: clamp(0.55rem, 2.2vw, 0.72rem);
        margin-top: 8px;
    }
}

/* ── Shared camera cell behaviour (used by Grid mode) ──────────────────── */

.camera-cell {
    cursor: pointer;
}

.camera-cell img {
    cursor: pointer !important;
}
