/* Parc Fermé – kontorskjerm. Designet for 4K 16:9, mørkt tema. */

/* Fullskjerm-knapp (overlay, auto-skjules) */
.fs-btn {
    position: fixed;
    right: 1.2vw;
    bottom: 1.2vw;
    z-index: 1000;
    width: 3vw;
    height: 3vw;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(20, 22, 28, .72);
    color: #f2f4f8;
    font-size: 1.5vw;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: translateY(0.4vw);
    transition: opacity .35s ease, transform .35s ease, background .2s;
    pointer-events: none;
}
.fs-btn:hover { background: #eaeaea; color: var(--bg); }
.fs-btn.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.fs-icon-enter, .fs-icon-exit { display: flex; }
.fs-icon-exit { display: none; font-size: 1.2vw; }
body.is-fullscreen .fs-icon-enter { display: none; }
body.is-fullscreen .fs-icon-exit  { display: flex; }


:root {
    --bg:         #002652;   /* Parc Fermé marineblå */
    --panel:      #013366;   /* litt lysere blå for paneler */
    --panel-2:    #0a3e78;   /* kort-innslag */
    --border:     rgba(234, 234, 234, .16);
    --text:       #eaeaea;
    --text-bright:#ffffff;
    --muted:      rgba(234, 234, 234, .62);
    --accent:     #ffffff;   /* lys uthevingsfarge */
    --accent-2:   #ffffff;
    --green:      #eaeaea;
    --gap:        0.4vw;
    --radius:     0.25vw;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Helvetica Neue", Helvetica, "Roboto", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.dashboard {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 25% 50% 25%;
    gap: var(--gap);
    padding: var(--gap);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

/* Midtkolonnen deles 70 / 30 vertikalt */
.col-mid {
    display: grid;
    grid-template-rows: 70% 30%;
    gap: var(--gap);
    min-height: 0;
    min-width: 0;
}
.mid-top, .mid-bottom { min-height: 0; min-width: 0; }
.col-left, .col-right { min-height: 0; min-width: 0; }

/* ---- Nettside-rammer (iframe skaleres av JS) ---- */
.frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #fff;
}
.frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
    transform-origin: top left;
    background: #fff;
}
.frame-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--panel-2);
    color: var(--muted);
    font-size: 1.4vw;
    line-height: 1.5;
}
.frame-fallback small { color: var(--muted); opacity: .7; }

/* Forside-skjermdump (bilde i midtpanelet) */
.shot {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--panel-2);
}
.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ---- Panel-overskrift ---- */
.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.7vw 1vw 0.5vw;
    border-bottom: 2px solid var(--accent);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.panel-title {
    font-size: 1.5vw;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.panel-sub {
    font-size: 1.1vw;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ---- På denne dag ---- */
.otd { display: flex; flex-direction: column; }
.otd-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 1vw 1.4vw;
}
.otd-card {
    position: absolute;
    inset: 0.6vw 1.4vw;
    display: flex;
    gap: 1.2vw;
    align-items: center;
    opacity: 0;
    transform: translateY(0.6vw);
    transition: opacity .6s ease, transform .6s ease;
}
.otd-card.is-active { opacity: 1; transform: none; }

.otd-photo {
    flex: 0 0 auto;
    width: 7vw;
    height: 7vw;
    border-radius: 0.25vw;
    object-fit: cover;
    background: var(--panel-2);
    border: 1px solid var(--border);
}
.otd-badge {
    flex: 0 0 auto;
    width: 7vw;
    height: 7vw;
    border-radius: 0.25vw;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.4vw;
    background: var(--panel-2);
    border: 1px solid var(--border);
}
.otd-body { min-width: 0; }
.otd-kicker {
    font-size: 1.05vw;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 0.3vw;
}
.otd-kicker.event    { color: var(--accent-2); }
.otd-kicker.birthday { color: var(--green); }
.otd-kicker.death    { color: var(--muted); }
.otd-year {
    font-size: 2.4vw;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.4vw;
}
.otd-text {
    font-size: 1.5vw;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.otd-name { font-size: 1.9vw; font-weight: 700; line-height: 1.2; }
.otd-meta { font-size: 1.3vw; color: var(--muted); margin-top: 0.3vw; }

.otd-loading { color: var(--muted); font-size: 1.4vw; padding: 1vw; }

.otd-dots {
    display: flex;
    gap: 0.4vw;
    justify-content: center;
    padding: 0.5vw 0 0.7vw;
    flex-wrap: wrap;
}
.otd-dot {
    width: 0.55vw;
    height: 0.55vw;
    border-radius: 50%;
    background: var(--border);
    transition: background .3s;
}
.otd-dot.is-active { background: var(--accent); }

/* ---- Terminliste ---- */
.termin { display: flex; flex-direction: column; }
.termin-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
}
.termin-list {
    will-change: transform;
    padding: 0.5vw;
    display: flex;
    flex-direction: column;
    gap: 0.55vw;
}

.termin-daygroup { padding: 0.2vw 0 0.4vw; }
.termin-dayhead {
    position: sticky;
    top: 0;
    background: var(--panel);
    padding: 0.55vw 1vw 0.35vw;
    font-size: 1.15vw;
    font-weight: 800;
    color: var(--accent-2);
    text-transform: capitalize;
    border-bottom: 1px solid var(--border);
}
.termin-dayhead.is-today { color: var(--accent); }

.termin-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 0.25vw;
    padding: 0.7vw 0.85vw;
}
.termin-card.is-ongoing {
    border-color: var(--accent);
    background: rgba(226, 35, 26, .14);
}
.termin-card-date {
    display: flex;
    align-items: center;
    gap: 0.45vw;
    font-size: 1.05vw;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.35vw;
}
.termin-card.is-today { border-color: rgba(255, 255, 255, .5); }
.termin-card.is-today .termin-card-date { color: var(--text-bright); }
.termin-card-date .badge-live { margin-left: auto; }
.termin-flag { font-size: 1.4vw; flex: 0 0 auto; text-align: center; }
.termin-info { min-width: 0; }
.termin-series {
    font-size: 1.45vw;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.termin-event {
    font-size: 1.15vw;
    color: var(--muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.badge-live {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.85vw;
    font-weight: 800;
    padding: 0.1vw 0.45vw;
    border-radius: 0.15vw;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* ---- Siste nytt (RSS, venstre panel) ---- */
.rss { display: flex; flex-direction: column; }
.rss-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
}
.rss-list { will-change: transform; }

.rss-card {
    padding: 0.8vw 0.9vw;
    border-bottom: 1px solid var(--border);
}
.rss-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.25vw;
    overflow: hidden;
    background: var(--panel-2);
    margin-bottom: 0.5vw;
}
.rss-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rss-title {
    font-size: 1.8vw;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rss-meta {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    margin-top: 0.4vw;
}
.rss-source {
    font-size: 0.8vw;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 0.05vw 0.4vw;
    border-radius: 0.15vw;
    background: rgba(255, 255, 255, .12);
    color: var(--text);
}
.rss-source.is-tavle {
    background: #eaeaea;
    color: var(--bg);
}
.rss-date {
    font-size: 0.95vw;
    color: var(--muted);
}
