/*
 * Classroom board and print stylesheet for dcf.cymru and lnf.cymru supply
 * teacher presentations. Plain HTML and CSS so a cover teacher can open the
 * deck in a browser on the classroom board, step through slides with a timer
 * and teacher script, or press Ctrl+P to print the slides with notes.
 */

:root {
    --ink: #1f1f1f;
    --ink-muted: #545454;
    --link: #0360a6;
    --element: #215b57;
    --element-dark: #163f3c;
    --element-soft: #eef5f4;
    --band: #f3f4f4;
    --rule: #c9c9c9;
    --brand: #c73333;
    --brand-soft: #fdf2f2;
    --board-bg: #1e2625;
}

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

body {
    margin: 0;
    font-family: Arial, Helvetica, "Nimbus Sans L", sans-serif;
    color: var(--ink);
    background: var(--board-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--link);
}

/* Top control bar for the supply teacher ---------------------------------- */

.deck-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.65rem 1.25rem;
    background: #121817;
    color: #fff;
    border-bottom: 2px solid var(--element);
}

.deck-bar__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.9rem;
}

.deck-bar__kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9bd1cd;
}

.deck-bar__title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.deck-bar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.85rem;
}

.deck-bar__links a {
    color: #b7e4e0;
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border: 1px solid #355c59;
    border-radius: 3px;
}

.deck-bar__links a:hover,
.deck-bar__links a:focus {
    background: var(--element);
    color: #fff;
}

.deck-bar__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.deck-btn {
    appearance: none;
    border: 1px solid #4a6b68;
    background: #1f3331;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

.deck-btn:hover,
.deck-btn:focus {
    background: var(--element);
    border-color: #7cc0bb;
}

.deck-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.deck-btn--accent {
    background: var(--brand);
    border-color: #e06b6b;
}

.deck-btn--accent:hover,
.deck-btn--accent:focus {
    background: #a52626;
}

.deck-counter {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 6.5rem;
    text-align: center;
    color: #e6f2f1;
}

.deck-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #0d1211;
    border: 1px solid #355c59;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
}

.deck-timer__readout {
    font-family: "DejaVu Sans Mono", Consolas, monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffd966;
    min-width: 3.6rem;
    text-align: center;
}

.deck-timer__readout.is-done {
    color: #ff8080;
}

/* Main stage -------------------------------------------------------------- */

.deck-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem 1.5rem 2rem;
    gap: 1rem;
}

.slide {
    display: none;
    width: 100%;
    max-width: 76rem;
    margin: 0 auto;
}

.slide.is-active {
    display: block;
}

/* 16:9 board surface readable from the back of the room ------------------- */

.slide__canvas {
    background: #fff;
    border: 3px solid var(--element);
    border-radius: 6px;
    padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.75rem, 3.5vw, 3.25rem);
    min-height: 34rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.slide__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 3px solid var(--element);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.slide__step {
    margin: 0;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--element);
}

.slide__time {
    display: inline-block;
    background: var(--element);
    color: #fff;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
}

.slide__canvas h1,
.slide__canvas h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.85rem, 3vw, 2.75rem);
    line-height: 1.18;
    color: var(--element-dark);
}

.slide__body {
    flex: 1;
    font-size: clamp(1.25rem, 1.85vw, 1.65rem);
    line-height: 1.48;
}

.slide__body p {
    margin: 0.55rem 0 0.9rem;
}

.slide__body ul,
.slide__body ol {
    margin: 0.55rem 0 0.9rem;
    padding-left: 1.6rem;
}

.slide__body li {
    margin: 0.45rem 0;
}

.slide__box {
    background: var(--element-soft);
    border-left: 6px solid var(--element);
    padding: 0.9rem 1.2rem;
    margin: 0.85rem 0;
    border-radius: 0 4px 4px 0;
}

.slide__box--prompt {
    background: var(--brand-soft);
    border-left-color: var(--brand);
}

.slide__box p:first-child {
    margin-top: 0;
}

.slide__box p:last-child {
    margin-bottom: 0;
}

.slide__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
    margin: 0.75rem 0;
}

.slide__card {
    border: 2px solid var(--rule);
    background: var(--band);
    padding: 0.85rem 1rem;
    border-radius: 4px;
}

.slide__card h3 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    color: var(--element-dark);
}

.slide__canvas table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
}

.slide__canvas th,
.slide__canvas td {
    border: 2px solid var(--ink);
    padding: 0.45rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.slide__canvas th {
    background: var(--element-soft);
    color: var(--element-dark);
}

.slide__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--rule);
    padding-top: 0.65rem;
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

/* Supply teacher script & notes box below the board ----------------------- */

.slide__notes {
    margin-top: 0.9rem;
    background: #fff;
    border-left: 6px solid var(--brand);
    border-radius: 4px;
    padding: 0.9rem 1.2rem;
    font-size: 1.02rem;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

body.hide-notes .slide__notes {
    display: none;
}

.slide__notes-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.3rem;
}

.slide__notes p {
    margin: 0.35rem 0;
}

/* Print: every slide on its own page with teacher notes ------------------- */

@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    body {
        background: #fff;
        display: block;
    }

    .deck-bar {
        display: none !important;
    }

    .deck-stage {
        padding: 0;
        display: block;
    }

    .slide {
        display: block !important;
        max-width: none;
        break-after: page;
        page-break-after: always;
    }

    .slide:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .slide__canvas {
        min-height: 0;
        box-shadow: none;
        padding: 1.1rem 1.35rem;
    }

    .slide__notes {
        display: block !important;
        box-shadow: none;
        border: 1px solid var(--rule);
        border-left: 5px solid var(--brand);
        margin-top: 0.6rem;
    }
}
