/* ==========================================================================
   /streymi/nytt/ — Nýtt á streymi (template-streymi-nytt.php)
   Cards: kvik_sn_card() · actions: js/card-actions.js
   ========================================================================== */

.sn-page {
    --sn-teal: #62b0ba;
    --sn-teal-dark: #0d9488;
    --sn-ink: #1a1f24;
    --sn-muted: #6b7280;
    --sn-line: #e6eaed;
    --sn-bg: #f3f5f6;
    --sn-gold: #f5b301;
    --sn-want: var(--kvik-want, #e0654f);          /* site tokens: css/kvik-actions.css */
    --sn-want-dark: var(--kvik-want-dark, #c9553f);
    --sn-seen: var(--kvik-seen, #62b0ba);
    background: var(--sn-bg);
    color: var(--sn-ink);
    font-family: 'Open Sans', Arial, sans-serif;
    padding-bottom: 48px;
}
.sn-wrap { max-width: 1240px; margin: 0 auto; padding-inline: 16px; box-sizing: border-box; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.sn-hero {
    background:
        radial-gradient(900px 300px at 85% -40%, rgba(98, 176, 186, .45), transparent 70%),
        linear-gradient(135deg, #2b3034 0%, #383d40 60%, #2f4b50 100%);
    color: #fff;
    padding-block: 34px 30px;
}
.sn-hero__title { margin: 0; font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.01em; color: #fff; }
.sn-hero__sub { margin: 8px 0 0; max-width: 680px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.sn-hero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sn-stat {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 13.5px;
    color: rgba(255, 255, 255, .9);
}
.sn-stat strong { color: #fff; font-size: 15px; }
.sn-stat--warn strong { color: #fdba74; }
.sn-stat--list strong { color: #ff9a86; }

/* ── Filters ───────────────────────────────────────────────────────────── */
.sn-filters { background: #fff; border-bottom: 1px solid var(--sn-line); padding-block: 12px; }
.sn-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sn-filters__row + .sn-filters__row { margin-top: 10px; }
.sn-filters__svcs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: thin; }

.sn-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 13px;
    border: 1px solid #dde3e7;
    border-radius: 999px;
    background: #fff;
    color: var(--sn-ink);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.sn-chip img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
.sn-chip:hover { border-color: var(--sn-teal); color: var(--sn-ink); text-decoration: none; }
.sn-chip.is-on { background: #e6f3f4; border-color: var(--sn-teal); box-shadow: inset 0 0 0 1px var(--sn-teal); }
.sn-chip--mine { color: #7e22ce; border-color: #e3ccff; }
.sn-chip--mine.is-on { background: #f3e8ff; border-color: #b77cf0; box-shadow: inset 0 0 0 1px #b77cf0; }

.sn-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #eef1f3; }
.sn-seg__opt {
    padding: 6px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.sn-seg__opt:hover { color: var(--sn-ink); text-decoration: none; }
.sn-seg__opt.is-on { background: #fff; color: var(--sn-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.sn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.sn-toggle:hover { color: var(--sn-ink); text-decoration: none; }
.sn-toggle__box {
    width: 32px; height: 18px; border-radius: 999px; background: #d1d5db; position: relative; transition: background .15s;
}
.sn-toggle__box::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.sn-toggle.is-on .sn-toggle__box { background: var(--sn-teal-dark); }
.sn-toggle.is-on .sn-toggle__box::after { transform: translateX(14px); }

/* ── Sections ──────────────────────────────────────────────────────────── */
.sn-section { margin-top: 34px; }
.sn-page .sn-section__head { background: none; padding: 0; width: auto;
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sn-section__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 800; color: var(--sn-ink); }
.sn-section__link { font-size: 14px; font-weight: 700; color: var(--sn-teal-dark); text-decoration: none; }
.sn-section__link:hover { text-decoration: underline; }
.sn-section__hint { font-size: 13px; color: var(--sn-muted); }
.sn-section__links { display: inline-flex; gap: 16px; margin-left: auto; }
.sn-section--followed { padding: 18px; border-radius: 16px; background: var(--kvik-want-soft, #fdece8); }
.sn-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-block; background-position: center; background-repeat: no-repeat; background-size: 18px; }
.sn-ico--new     { background-color: #e6f3f4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M18.4 5.6l-2.8 2.8M8.4 15.6l-2.8 2.8'/%3E%3C/svg%3E"); }
.sn-ico--leaving { background-color: #fff1e8; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2 2M9 2h6'/%3E%3C/svg%3E"); }
.sn-ico--list    { background-color: #fdece8; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0654f' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.sn-ico--is      { background-color: #eef3fb; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 18'%3E%3Crect width='25' height='18' rx='2' fill='%2302529c'/%3E%3Cpath d='M0 9h25M9 0v18' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M0 9h25M9 0v18' stroke='%23dc1e35' stroke-width='2'/%3E%3C/svg%3E"); background-size: 20px 14px; }
.sn-ico--live    { background-color: #fdece8; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0654f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='13' rx='2'/%3E%3Cpath d='M8 3l4 4 4-4'/%3E%3Ccircle cx='17.5' cy='11.5' r='1.2' fill='%23e0654f'/%3E%3C/svg%3E"); }
.sn-ico--hot     { background-color: #fff5db; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M12 2s5 5 5 10a5 5 0 0 1-10 0c0-2 1-3 1-3s1 2 2 2c0-3 2-6 2-9z'/%3E%3C/svg%3E"); }

.sn-day {
    display: flex; align-items: center; gap: 8px;
    margin: 22px 0 12px; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sn-teal-dark);
}
.sn-day::after { content: ''; flex: 1; height: 1px; background: var(--sn-line); }
.sn-day__n { padding: 1px 8px; border-radius: 999px; background: #e6f3f4; font-size: 12px; letter-spacing: 0; }

.sn-note { color: var(--sn-muted); font-size: 14px; }
.sn-note--since { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px dashed #cfd8dc; }
.sn-empty { margin: 40px auto; max-width: 560px; text-align: center; padding: 30px; background: #fff; border-radius: 16px; }
.sn-admin { font-size: 13px; color: #92400e; background: #fffbeb; padding: 10px; border-radius: 8px; }

.sn-nudge {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 26px; padding: 18px 20px; border-radius: 16px;
    background: linear-gradient(120deg, #fdece8, #e6f3f4);
    border: 1px solid #f6d5cd;
}
.sn-nudge__text { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.sn-nudge__text strong { font-size: 17px; }
.sn-nudge__text span { color: #4b5563; font-size: 14px; }
.sn-nudge__btn {
    border: 0; border-radius: 999px; padding: 10px 20px; background: var(--sn-want); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
}
.sn-nudge__btn:hover { background: var(--sn-want-dark); }

/* ── Grid + cards ──────────────────────────────────────────────────────── */
.sn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.sn-card--more { display: none; }
.sn-grid.is-expanded .sn-card--more { display: flex; }
.sn-more { text-align: center; margin-top: 16px; }
.sn-more__btn {
    border: 1px solid #d1d9dd; background: #fff; border-radius: 999px; padding: 9px 22px;
    font-weight: 700; font-size: 14px; color: var(--sn-ink); cursor: pointer;
}
.sn-more__btn:hover { border-color: var(--sn-teal); }

.sn-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 6px 16px rgba(0, 0, 0, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}
.sn-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0, 0, 0, .1), 0 14px 30px rgba(0, 0, 0, .1); }

.sn-card__media { position: relative; }
.sn-card__poster { display: block; aspect-ratio: 2 / 3; background: linear-gradient(160deg, #dfe5e8, #c9d2d7); }
.sn-card__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sn-card__noposter { display: flex; align-items: center; justify-content: center; height: 100%; padding: 12px; text-align: center; font-weight: 700; color: #4b5563; }

.sn-card__badge {
    position: absolute; left: 8px; top: 8px;
    padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.sn-card__badge--new { background: var(--sn-teal-dark); }
.sn-card__badge--leaving { background: #ea580c; }
/* Episode badges ("Þáttaraðir í gangi") — bottom of the poster, full width */
.sn-card__badge--ep { left: 8px; right: 8px; top: auto; bottom: 8px; text-align: center; font-size: 11px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-card__badge--aired { background: var(--kvik-seen, #62b0ba); }
.sn-card__badge--next  { background: rgba(20, 24, 28, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.sn-card__acts { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.kca-btn {
    width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 24, 28, .62); color: #fff; cursor: pointer;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    transition: background .12s, transform .12s;
}
.kca-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.kca-btn:hover { transform: scale(1.08); background: rgba(20, 24, 28, .82); }
.kca-btn--want.is-on { background: var(--kvik-want, #e0654f); }
.kca-btn--want.is-on:hover { background: var(--kvik-want-dark, #c9553f); }
.kca-btn--want.is-on svg { fill: currentColor; }
.kca-btn--seen.is-on { background: var(--kvik-seen, #62b0ba); }
.kca-btn--seen.is-on:hover { background: #4f9aa4; }

.sn-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 10px 11px 12px; }
.sn-card__title {
    font-size: 14.5px; font-weight: 800; line-height: 1.25; color: var(--sn-ink); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
.sn-card__title:hover { color: var(--sn-teal-dark); text-decoration: none; }
.sn-card__meta { font-size: 12.5px; color: var(--sn-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.sn-dot { color: #c2c9ce; }
.sn-card__imdb { font-weight: 700; color: #a86a00; }

.sn-card__svcs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.sn-svc {
    position: relative; display: inline-flex; align-items: center; gap: 4px;
    height: 28px; padding: 3px; border: 1px solid var(--sn-line); border-radius: 7px; background: #fff; text-decoration: none;
    transition: border-color .12s, transform .12s;
}
.sn-svc img { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.sn-svc--apple img, .sn-svc--disney img, .sn-svc--prime img { width: 38px; }
/* Disney+ logo is white text for dark backgrounds */
.sn-svc--disney { background: #0c1633; border-color: #0c1633; }
.sn-chip--disney img { background: #0c1633; padding: 2px 4px; width: 40px; }
.sn-chip--prime img, .sn-chip--apple img { width: 40px; }
a.sn-svc:hover { border-color: var(--sn-teal); transform: translateY(-1px); text-decoration: none; }
.sn-svc__tag { font-size: 10px; font-weight: 800; color: #92400e; background: #fff5db; border-radius: 4px; padding: 1px 4px; }

/* Rating (5 half-stars → 1–10) */
.kca-rate { display: flex; align-items: center; gap: 1px; margin-top: auto; padding-top: 6px; border-top: 1px solid #f0f2f4; }
.kca-star {
    position: relative; padding: 0 1px; border: 0; background: none; cursor: pointer;
    font-size: 19px; line-height: 1; color: #d6dbdf; transition: transform .1s;
}
.kca-star:hover { transform: scale(1.15); }
.kca-star.is-full { color: var(--sn-gold); }
.kca-star.is-half::before {
    content: '★'; position: absolute; left: 1px; top: 0; width: 50%; overflow: hidden; color: var(--sn-gold);
}
.kca-rate__label { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--sn-muted); }
.kca--rated .kca-rate__label { color: #a86a00; }
.kca--ask:not(.kca--rated) .kca-rate { animation: kcaPulse 1.6s ease-in-out 2; }
@keyframes kcaPulse { 0%, 100% { background: transparent; } 50% { background: #fff8e1; } }
.kca--saved .kca-rate__label::after { content: ' ✓'; color: var(--sn-teal-dark); }

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .sn-hero { padding-block: 24px 22px; }
    .sn-hero__sub { font-size: 14.5px; }
    .sn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sn-section__head h2 { font-size: 19px; }
    .sn-card__body { padding: 9px 9px 10px; }
    .kca-star { font-size: 21px; padding: 0 2px; }
    .kca-rate__label { display: none; }
    .sn-filters__row:not(.sn-filters__svcs) { gap: 6px; }
    .sn-seg { overflow-x: auto; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .sn-card, .kca-btn, .kca-star, .sn-svc { transition: none; }
    .kca--ask .kca-rate { animation: none; }
}

/* Icelandic flag in the "Aðeins íslenskt" toggle */
.sn-flag { display: inline-block; width: 18px; height: 13px; border-radius: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 18'%3E%3Crect width='25' height='18' rx='2' fill='%2302529c'/%3E%3Cpath d='M0 9h25M9 0v18' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M0 9h25M9 0v18' stroke='%23dc1e35' stroke-width='2'/%3E%3C/svg%3E") center / cover no-repeat; }
