/* Fire Prevention for Kids — slide deck (fire-prevention.php)
 *
 * Everything inside .fp-stage is sized in cqw, so a slide looks the same in the
 * page column, on a phone, and full screen on a projector.
 *
 * Without JavaScript (or with "Show all slides" on) the slides stack and each
 * one is followed by its speaker notes. js/fire-prevention.js adds .is-live to
 * .fp-deck to turn the stack into a one-at-a-time deck.
 *
 * Gold is used on dark grounds only, per the :root note in style.css.
 */

.fp-deck {
    --fp-yes: #7BE08D;
    --fp-no: #FF9C94;
    margin-bottom: 2rem;
}

.fp-stage {
    container-type: inline-size;
    position: relative;
    width: 100%;
}

/* ---------- Slides ---------- */

.fp-slide {
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.6cqw;
    padding: 4cqw 5cqw 5cqw;
    overflow: hidden;
    text-align: center;
    color: var(--bone);
    background: radial-gradient(120% 120% at 50% 0%, #6B0A10 0%, var(--dark-red) 45%, var(--ink) 100%);
    border-radius: var(--border-radius);
    font-size: 3cqw;
    line-height: 1.25;
}

.fp-slide h2 {
    margin: 0;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 700;
    font-size: 6cqw;
    line-height: 1.05;
    letter-spacing: 0.15cqw;
    text-transform: uppercase;
    color: #fff;
    border: 0;
    padding: 0;
}

.fp-slide p {
    margin: 0;
}

.fp-kicker {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 600;
    font-size: 2.6cqw;
    letter-spacing: 0.5cqw;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: -1.6cqw !important;
}

.fp-big {
    font-size: 3.6cqw;
    font-weight: bold;
}

.fp-big strong {
    color: var(--gold);
}

/* Title slide */

.fp-slide--title {
    gap: 1.6cqw;
}

.fp-slide--title h2 {
    font-size: 9cqw;
}

.fp-title-icon {
    font-size: 9cqw;
    color: var(--gold);
}

.fp-title-sub {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 600;
    font-size: 4.6cqw;
    letter-spacing: 0.3cqw;
    text-transform: uppercase;
    color: var(--gold);
}

.fp-title-meta {
    margin-top: 2cqw !important;
    font-size: 2.6cqw;
    font-weight: bold;
}

.fp-title-org {
    font-size: 2.1cqw;
}

/* Icon tiles */

.fp-tiles {
    display: grid;
    gap: 2cqw;
    width: 100%;
}

.fp-tiles--2 { grid-template-columns: repeat(2, 1fr); }
.fp-tiles--3 { grid-template-columns: repeat(3, 1fr); }
.fp-tiles--5 { grid-template-columns: repeat(5, 1fr); }

.fp-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.4cqw;
    padding: 2.4cqw 1.2cqw;
    background: rgba(255, 255, 255, 0.08);
    border: 0.3cqw solid rgba(245, 179, 1, 0.55);
    border-radius: 2cqw;
    font-size: 2.5cqw;
    font-weight: bold;
}

.fp-tile i {
    font-size: 7.5cqw;
    color: var(--gold);
}

.fp-tiles--5 .fp-tile {
    font-size: 2.1cqw;
}

.fp-tiles--5 .fp-tile i {
    font-size: 6.5cqw;
}

.fp-tile--wide {
    padding: 3cqw 2cqw;
    font-size: 3cqw;
}

.fp-tile--wide i {
    font-size: 9cqw;
}

/* Yes / No panels */

.fp-compare {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3cqw;
    width: 100%;
}

.fp-panel {
    display: flex;
    flex-direction: column;
    gap: 1.4cqw;
    padding: 2.4cqw;
    background: rgba(255, 255, 255, 0.08);
    border: 0.4cqw solid currentColor;
    border-radius: 2cqw;
    font-size: 3.3cqw;
    font-weight: bold;
}

.fp-panel p {
    color: var(--bone);
}

.fp-panel--yes { color: var(--fp-yes); }
.fp-panel--no { color: var(--fp-no); }

.fp-panel .fp-panel-head {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 4.6cqw;
    text-transform: uppercase;
    letter-spacing: 0.3cqw;
    color: inherit;
}

/* Smoke alarm and 911 */

.fp-sound,
.fp-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5cqw;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 700;
    font-size: 9cqw;
    line-height: 1;
    color: var(--gold);
}

.fp-call {
    font-size: 14cqw;
    letter-spacing: 0.6cqw;
}

.fp-sound i {
    color: #fff;
}

.fp-call i {
    font-size: 9cqw;
    color: #fff;
}

/* Quiz */

.fp-quiz {
    list-style: none;
    display: grid;
    gap: 1.4cqw;
    width: 100%;
    margin: 0;
    padding: 0;
}

.fp-quiz li {
    display: grid;
    grid-template-columns: 1fr 27cqw;
    align-items: center;
    gap: 2cqw;
    padding: 1.3cqw 2cqw;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.6cqw;
    font-size: 2.6cqw;
    font-weight: bold;
    text-align: left;
}

.fp-quiz-a {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 2.8cqw;
    text-transform: uppercase;
    white-space: nowrap;
}

.fp-quiz-a--yes { color: var(--fp-yes); }
.fp-quiz-a--no { color: var(--fp-no); }

/* Mission list */

.fp-mission {
    display: grid;
    gap: 1.6cqw;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: fp-mission;
    text-align: left;
    font-size: 3.3cqw;
    font-weight: bold;
}

.fp-mission li {
    display: flex;
    align-items: center;
    gap: 2.4cqw;
    padding: 1.4cqw 2cqw;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.6cqw;
    counter-increment: fp-mission;
}

.fp-mission li::before {
    content: counter(fp-mission);
    flex: none;
    width: 5.6cqw;
    height: 5.6cqw;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 3.6cqw;
}

/* ---------- Speaker notes ---------- */

.fp-notes,
.fp-notes-panel {
    margin: 0.75rem 0 2rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tint-red);
    border-left: 6px solid var(--primary-red);
    border-radius: 8px;
    color: var(--text-dark);
    text-align: left;
}

.fp-notes p:last-child,
.fp-notes-panel p:last-child {
    margin-bottom: 0;
}

.fp-notes-panel h3 {
    margin: 0 0 0.5rem;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-red);
}

.fp-progress {
    display: none;
}

/* ---------- Live deck (JavaScript on) ---------- */

.fp-deck.is-live .fp-stage {
    aspect-ratio: 16 / 9;
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.fp-deck.is-live .fp-slide {
    position: absolute;
    inset: 0;
    border-radius: 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.fp-deck.is-live .fp-slide.is-current {
    visibility: visible;
    opacity: 1;
}

.fp-deck.is-live .fp-notes {
    display: none;
}

.fp-deck.is-live .fp-step {
    visibility: hidden;
}

.fp-deck.is-live .fp-step.is-shown {
    visibility: visible;
}

.fp-deck.is-live .fp-progress {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0.8cqw;
    background: rgba(255, 255, 255, 0.15);
}

.fp-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gold);
    transition: width 0.25s ease;
}

.fp-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 1rem;
}

.fp-controls[hidden],
.fp-notes-panel[hidden] {
    display: none;
}

.fp-btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-red);
    background: #fff;
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    cursor: pointer;
}

a.fp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    text-decoration: none;
}

.fp-btn:hover,
.fp-btn[aria-pressed="true"] {
    color: #fff;
    background: var(--primary-red);
}

.fp-btn--primary {
    color: #fff;
    background: var(--primary-red);
    margin-left: auto;
}

.fp-btn--primary:hover {
    background: var(--dark-red);
    border-color: var(--dark-red);
}

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

.fp-status {
    font-weight: bold;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.fp-clock.is-over {
    color: var(--primary-red);
}

/* ---------- Full screen ---------- */

.fp-deck:fullscreen {
    display: grid;
    place-items: center;
    margin: 0;
    background: #000;
}

.fp-deck:fullscreen .fp-stage {
    width: min(100vw, calc(100vh * 16 / 9));
    border-radius: 0;
    box-shadow: none;
    cursor: none;
}

.fp-deck:fullscreen .fp-controls,
.fp-deck:fullscreen .fp-notes-panel {
    display: none;
}

/* ---------- Presenter view (fire-prevention.php?presenter) ----------
 *
 * The phone view. A small copy of the current slide and the next press sit at
 * the top, the notes fill the middle in large type, and the clock and the
 * Back / Next buttons are fixed to the bottom where a thumb reaches them.
 */

body.fp-presenter {
    display: block;
    background: var(--ink);
}

.fp-presenter-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 12px 150px;
}

.fp-presenter .fp-deck {
    display: grid;
    grid-template-columns: 46% 1fr;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.fp-presenter .fp-deck.is-live .fp-stage {
    border-radius: 6px;
    box-shadow: none;
}

.fp-upnext-label {
    margin: 0;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}

.fp-upnext-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.25;
    color: var(--bone);
}

.fp-presenter .fp-notes-panel {
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px 16px;
    font-size: 20px;
    line-height: 1.45;
}

.fp-presenter .fp-notes-panel h3 {
    display: none;
}

.fp-presenter .fp-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
    margin: 0;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--dark-red);
    border-top: 2px solid var(--gold);
}

.fp-presenter .fp-status {
    order: -1;
    color: var(--bone);
    font-size: 15px;
}

.fp-presenter .fp-clock {
    text-align: right;
}

.fp-presenter .fp-clock.is-behind {
    color: var(--gold);
}

.fp-presenter .fp-clock.is-over {
    color: var(--fp-no);
}

.fp-presenter .fp-btn {
    min-height: 64px;
    font-size: 20px;
    touch-action: manipulation;
}

.fp-presenter .fp-btn[hidden],
.fp-presenter #fp-full,
.fp-presenter #fp-all {
    display: none;
}

.fp-presenter #fp-next,
.fp-presenter #fp-restart {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--gold);
}

.fp-presenter-exit {
    margin: 48px 0 0;
    text-align: center;
}

.fp-presenter-exit a {
    color: var(--bone);
}

@media (prefers-reduced-motion: reduce) {
    .fp-deck.is-live .fp-slide,
    .fp-progress span {
        transition: none;
    }
}

@media print {
    .fp-controls,
    .fp-notes-panel {
        display: none !important;
    }

    .fp-slide,
    .fp-notes {
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
