/* =============================================================
   JAVNA STRANICA - stilovi za roditelje (mobile first)
   ============================================================= */

/* ─── Reset / base ────────────────────────────────────────── */

.public-page {
    background: #f0f2f5;
    overflow-x: hidden;
    position: relative;
}

.public-page::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(60vw, 400px);
    height: min(60vw, 400px);
    background-image: url('../../images/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.045;
    pointer-events: none;
    z-index: 0;
}

.public-page > * { position: relative; z-index: 1; }

/* ─── Header ──────────────────────────────────────────────── */

.pub-header {
    background: linear-gradient(135deg, #003a70 0%, #1a56a0 100%);
    color: #fff;
    padding: 0 20px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.pub-header-inner {
    display: flex; align-items: center; gap: 14px;
    max-width: 1200px; margin: auto;
    height: 60px;
}
.pub-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.pub-title { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.2; }
.pub-subtitle { font-size: .775rem; opacity: .8; margin: 0; }
.pub-header-title { flex: 1; min-width: 0; }

/* ─── Preklopnik jezika ───────────────────────────────────── */
.lang-switch { position: relative; flex-shrink: 0; }
.lang-switch-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
    color: #fff; border-radius: 18px; padding: 5px 10px; cursor: pointer;
    font: inherit; font-size: .8rem;
}
.lang-switch-btn:hover { background: rgba(255,255,255,.25); }
.lang-switch-flag { width: 20px; height: 14px; border-radius: 2px; display: inline-block; }
.lang-switch-caret { font-size: .65rem; opacity: .8; }
.lang-switch-menu {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
    padding: 6px; min-width: 160px; z-index: 50;
}
.lang-opt {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: none; border: none; border-radius: 7px; padding: 8px 10px;
    font: inherit; font-size: .85rem; color: #0f172a; cursor: pointer; text-align: left;
}
.lang-opt:hover { background: #f1f5f9; }
.lang-opt--active { background: #e8f5e9; font-weight: 600; }
.lang-opt .fi { width: 22px; height: 15px; border-radius: 2px; flex-shrink: 0; }

/* ─── Main ────────────────────────────────────────────────── */

.pub-main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }

/* ─── Loading spinner ─────────────────────────────────────── */

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-2);
}
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Error banner ────────────────────────────────────────── */

.error-banner {
    background: #fce8e6; color: #c5221f;
    border: 1px solid #f5c6c4;
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
    margin: 40px auto;
    max-width: 500px;
}

/* ─── Ukupni poredak (svih generacija) ────────────────────── */

.overall-card {
    background: linear-gradient(135deg, #143a1e 0%, #1a5c2a 100%);
    color: #fff;
    border-radius: 14px;
    padding: 16px 18px 14px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(20,58,30,.25);
}
.overall-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -.01em;
}
.overall-title span { font-weight: 500; opacity: .7; font-size: .82rem; }
.overall-table { width: 100%; border-collapse: collapse; }
.overall-table th {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
    color: rgba(255,255,255,.6); text-align: center; padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.overall-table th:nth-child(2) { text-align: left; }
.overall-table td {
    padding: 8px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.overall-table tr:last-child td { border-bottom: none; }
.ov-rank { text-align: center; font-weight: 700; width: 44px; font-size: 1.05rem; }
.ov-club { display: flex; align-items: center; gap: 10px; }
.ov-logo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #fff; flex-shrink: 0; }
.ov-logo--ph {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.15); color: #fff; font-weight: 700; font-size: .85rem;
}
.ov-name { font-weight: 600; }
.ov-points { text-align: center; font-weight: 800; font-size: 1.2rem; width: 56px; }
.overall-legend {
    font-size: .72rem; line-height: 1.5; color: rgba(255,255,255,.72);
    margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12);
}
.overall-legend b { color: #fff; font-weight: 700; }

/* ─── Category tabs ───────────────────────────────────────── */

/* Opis turnira ispod naziva/datuma */
.pub-description {
    color: var(--color-text-2); font-size: .95rem; line-height: 1.55;
    margin: 0 0 16px; max-width: 760px;
}
/* Linija: generacije lijevo + Propozicije + Streaming desno */
.pub-tabsbar {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.pub-tabsbar .category-tabs { margin-bottom: 0; flex: 1; }
.pub-tabsbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.pub-rules-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 24px;
    border: 1.5px solid var(--color-border, #e2e8f0); background: var(--color-surface);
    color: var(--color-text, #0f172a); font-family: var(--font); font-size: .85rem; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, transform .12s;
    flex-shrink: 0;
}
.pub-rules-btn:hover { border-color: var(--color-primary, #1d4ed8); background: #f8fafc; transform: translateY(-1px); }
/* Štampa cijelog turnira — isti oblik kao propozicije, jer je ista vrsta akcije */
.pub-print-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 24px;
    border: 1.5px solid var(--color-border, #e2e8f0); background: var(--color-surface);
    color: var(--color-text, #0f172a); font-family: var(--font); font-size: .85rem; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: border-color .15s, background .15s, transform .12s;
    flex-shrink: 0;
}
.pub-print-btn:hover { border-color: var(--color-primary, #1d4ed8); background: #f8fafc; transform: translateY(-1px); }
.pub-stream-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 24px;
    background: #dc2626; color: #fff;
    font-family: var(--font); font-size: .85rem; font-weight: 700;
    text-decoration: none; white-space: nowrap;
    transition: background .15s, transform .12s;
    flex-shrink: 0; animation: stream-pulse 2s ease-in-out infinite;
}
.pub-stream-btn:hover { background: #b91c1c; transform: translateY(-1px); }
@keyframes stream-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
    50%       { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
}

/* Propozicije modal */
.rules-modal {
    max-width: 640px;
    border-top: 4px solid var(--color-primary, #2563eb);
}
.rules-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    padding: 20px 24px 0;
    color: var(--color-primary, #2563eb);
}
.rules-modal-content {
    white-space: pre-wrap;
    line-height: 1.7;
    color: #334155;
    font-size: .95rem;
    max-height: 64vh;
    overflow-y: auto;
    padding: 16px 24px 24px;
}
.rules-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 24px 20px;
}
.btn-rules-print {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid var(--color-primary, #2563eb);
    border-radius: 22px;
    background: transparent;
    color: var(--color-primary, #2563eb);
    font-family: inherit; font-size: .875rem; font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.btn-rules-print:hover {
    background: var(--color-primary, #2563eb);
    color: #fff;
}
.btn-rules-print:focus-visible {
    outline: 2px solid var(--color-primary, #2563eb);
    outline-offset: 2px;
}

/* ─── Štampa samo propozicija ──────────────────────────────────
   Aktivira se klasom .printing-rules na body (postavlja je index.php).
   Sve ostalo se sakrije, modal se pretvori u običan dokument. */
@media print {
    body.printing-rules > *:not(#rulesModalBackdrop) { display: none !important; }

    body.printing-rules #rulesModalBackdrop {
        position: static !important;
        display: block !important;
        background: none !important;
        padding: 0 !important;
        inset: auto !important;
    }
    body.printing-rules .rules-modal {
        position: static !important;
        max-width: none !important;
        max-height: none !important;
        box-shadow: none !important;
        border-top: none !important;
        border-radius: 0 !important;
        transform: none !important;
    }
    body.printing-rules .rules-modal-content {
        max-height: none !important;
        overflow: visible !important;
        color: #000 !important;
        font-size: 11pt;
        padding: 0 !important;
    }
    body.printing-rules .rules-modal-title {
        padding: 0 0 12px !important;
        color: #000 !important;
        border-bottom: 2px solid #000;
        margin-bottom: 14px !important;
    }
    /* Kontrole nisu dio dokumenta */
    body.printing-rules .match-modal-close,
    body.printing-rules .match-modal-handle,
    body.printing-rules .rules-modal-actions { display: none !important; }
}

.category-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.cat-tab {
    padding: 7px 20px;
    border: 2px solid transparent;
    border-radius: 24px;
    font-family: var(--font); font-size: .875rem; font-weight: 600;
    cursor: pointer;
    background: var(--color-surface);
    color: var(--color-text-2);
    transition: all .18s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.cat-tab:hover { border-color: var(--cat-color, var(--color-primary)); color: var(--cat-color, var(--color-primary)); }
.cat-tab--active {
    background: var(--cat-color, var(--color-primary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
/* "SVE" tab — objedinjena satnica svih kategorija (mix turniri) */
.cat-tab--all {
    color: var(--color-text);
    border-color: #cbd5e1;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
}
.cat-tab--all:hover { border-color: var(--color-primary); color: var(--color-primary); }
.cat-tab--all.cat-tab--active {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #fff; border-color: transparent;
}

/* Ukupni poredak tab — zlatni akcent da se istakne */
.cat-tab--overall { color: #8a6d1a; border-color: #e3c766; }
.cat-tab--overall:hover { border-color: #c9a227; color: #6b540f; }
.cat-tab--overall.cat-tab--active { background: linear-gradient(135deg, #b8901f, #d9b347); color: #fff; border-color: transparent; }

/* ─── Category panels ─────────────────────────────────────── */

.cat-panel { display: none; }
.cat-panel--active { display: block; }

/* ─── Section tabs (Satnica / Rezultati) ─────────────────── */

.section-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}

.sec-tab {
    padding: 8px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    background: none;
    font-family: var(--font);
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-text-2);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    border-radius: 0;
}
.sec-tab:hover { color: var(--cat-color, var(--color-primary)); }
.sec-tab--active {
    color: var(--cat-color, var(--color-primary));
    border-bottom-color: var(--cat-color, var(--color-primary));
}

.sec-panel { display: none; }
.sec-panel--active { display: block; }

/* ─── Panel layout ────────────────────────────────────────── */

.panel-sections {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .panel-sections {
        grid-template-columns: 1fr 1fr;
    }
    .panel-section--full {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .panel-sections {
        grid-template-columns: 2fr 1fr;
    }
    /* Satnica zauzima puni red */
    .panel-section:first-child {
        grid-column: 1 / -1;
    }
    .panel-section--full {
        grid-column: 1 / -1;
    }
}

/* ─── Section card ────────────────────────────────────────── */

.panel-section {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    min-width: 0;
    overflow-x: clip;
}

.section-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-2);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

/* ─── Collapsible sekcija ─────────────────────────────────── */
.section-title--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid var(--color-border);
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-2);
    cursor: pointer;
    padding: 0 0 8px;
}
.section-chevron { transition: transform .2s; font-size: 1rem; }
.panel-section--collapsible.collapsed .section-chevron { transform: rotate(-90deg); }
.panel-section--collapsible.collapsed .fairplay-wrap { display: none; }
.panel-section--collapsible:not(.collapsed) .section-title--toggle { margin-bottom: 14px; }

/* ─── Schedule ────────────────────────────────────────────── */

/* Panel sekcija koja sadrži satnicu nema padding — scroll ide do ruba */
.panel-section--schedule {
    padding: 0;
    overflow: hidden;
}
.panel-section--schedule .section-title {
    padding: 16px 16px 8px;
    margin-bottom: 0;
}

.schedule-wrap {
    overflow-x: auto;
    width: 100%;
}

/* ─── Bracket ─────────────────────────────────────────────── */

.bracket-wrap-outer {
    width: 100%;
    overflow: hidden;   /* skrol je na .bracket-scroll; podium ostaje u viewportu */
}

/* Samo bracket stupci skroluju horizontalno */
.bracket-scroll {
    overflow-x: auto;
    width: 100%;
}

.bracket-wrap {
    padding-bottom: 4px;
    min-width: -webkit-fill-available;
    min-width: fit-content;
}

.bracket-columns {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: -webkit-fill-available;
    min-width: fit-content;
    padding: 4px;
}

.bracket-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 150px;
    flex: 1;
}

/* Mobitel: bracket stablo u jednu kolonu (faze jedna ispod druge, bez horizontalnog skrola) */
@media (max-width: 600px) {
    .bracket-columns { flex-direction: column; gap: 16px; min-width: 0; }
    .bracket-wrap { min-width: 0; }
    .bracket-col { min-width: 0; width: 100%; }
    .bracket-col-matches { align-items: center; }
    .bracket-col .bm { width: 100%; max-width: 320px; }
}

.bracket-col-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-2);
    margin-bottom: 10px;
    text-align: center;
}

.bracket-col-matches {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Bracket match kartica */
.bm {
    border: 2px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg);
}
.bm--finished { border-color: var(--cat-color, var(--color-border)); }

.bm-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    gap: 6px;
    font-size: .8rem;
    min-height: 34px;
}
.bm-team--winner {
    background: color-mix(in srgb, var(--cat-color, #1a73e8) 10%, #fff);
    font-weight: 700;
}
.bm-team--empty { color: var(--color-text-2); font-style: italic; }
.bm-team-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.bm-score {
    font-weight: 700;
    font-size: .9rem;
    min-width: 20px;
    text-align: center;
    color: var(--cat-color, var(--color-text-1));
    flex-shrink: 0;
}
.bm-divider { height: 1px; background: var(--color-border); }

/* 3. mjesto i finale — centrirani blokovi ispod bracket stabla */
.bracket-extra {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.bracket-extra .bm { width: 100%; max-width: 280px; }
.bracket-extra-title {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--color-text-2); text-align: center;
}

/* Finale — naglašeno (vrhunac) */
.bracket-final {
    margin-top: 22px;
    padding: 14px 12px 16px;
    border-radius: 12px;
    background: #f4f8ff;                 /* fallback */
    background: color-mix(in srgb, var(--color-primary, #1a73e8) 6%, #fff);
    border: 1px solid #dbe7fb;           /* fallback */
    border: 1px solid color-mix(in srgb, var(--color-primary, #1a73e8) 20%, #fff);
}
.bracket-final-title { font-size: .9rem; color: var(--color-text); margin-bottom: 4px; }
.bracket-final .bm { max-width: 320px; border-width: 2px; }
.bracket-final .bm-team { padding: 11px 14px; font-size: .9rem; min-height: 42px; }
.bracket-final .bm-team-name { font-size: .88rem; }
.bracket-final .bm-score { font-size: 1.05rem; }

/* 3. mjesto — diskretan dashed razdjelnik iznad */
.bracket-third { padding-top: 14px; border-top: 1px dashed var(--color-border); }

/* ─── Podium ──────────────────────────────────────────────── */

.pub-podium {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--color-border);
}

.pub-podium-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-2);
    margin-bottom: 16px;
    text-align: center;
}

.pub-podium-steps {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    max-width: 360px;
    margin: 0 auto;
}

.pub-podium-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.pub-podium-medal { font-size: 1.4rem; margin-bottom: 4px; }

.pub-podium-block {
    width: 100%;
    border-radius: 6px 6px 0 0;
}
.pub-podium-block--1 { height: 68px; background: linear-gradient(180deg, #f9d423, #f4a800); }
.pub-podium-block--2 { height: 48px; background: linear-gradient(180deg, #d0d8e0, #9eaab5); }
.pub-podium-block--3 { height: 32px; background: linear-gradient(180deg, #e0a96d, #b87333); }

.pub-podium-rank { font-size: .7rem; font-weight: 700; color: var(--color-text-2); margin-top: 6px; }
.pub-podium-name { font-size: .78rem; font-weight: 600; text-align: center; line-height: 1.2; margin-top: 2px; }
.pub-podium-fourth { font-size: .7rem; color: var(--color-text-2); margin-top: 8px; text-align: center; }

/* ─── Live refresh indicator ──────────────────────────────── */

.refresh-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    flex-shrink: 0;
    margin-left: auto;
    transition: background .3s ease;
}
.refresh-indicator.refresh-pulse {
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    animation: refresh-pop .8s ease forwards;
}
@keyframes refresh-pop {
    0%   { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1);   opacity: .35; }
}

/* ─── Sponsor ticker ──────────────────────────────────────── */

.sponsor-ticker {
    background: #fff;
    border-top: 1px solid var(--color-border);
    padding: 10px 0;
    overflow: hidden;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}

.sponsor-ticker-track {
    display: flex;
    align-items: center;
    gap: 40px;
    width: max-content;
    animation: ticker-scroll 20s linear infinite;
}

.sponsor-ticker:hover .sponsor-ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.sponsor-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.sponsor-logo {
    height: 36px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: .85;
    transition: opacity .2s, filter .2s;
}
.sponsor-item:hover .sponsor-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* ─── Match detail modal ──────────────────────────────────── */

.match-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: backdropIn .2s ease;
}
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 600px) {
    .match-modal-backdrop { align-items: center; padding: 20px; }
}

.match-modal {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp .25s ease;
    position: relative;
    border-top: 4px solid var(--modal-cat-color, #1a73e8);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 600px) {
    .match-modal { border-radius: 16px; max-height: 85vh; }
}

.match-modal-handle {
    width: 40px; height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 0;
}

.match-modal-header {
    padding: 14px 16px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.match-modal-phase {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
    background: var(--modal-cat-color, #1a73e8);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}
.mm-meta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}
.mm-meta-time {
    font-size: .82rem;
    font-weight: 700;
    color: var(--modal-cat-color, #1a73e8);
    font-variant-numeric: tabular-nums;
}
.mm-meta-field {
    font-size: .78rem;
    color: #475569;
    font-weight: 500;
}
.mm-meta-field::before {
    content: '🏟️ ';
    font-size: .75rem;
}
.mm-meta-official {
    font-size: .75rem;
    color: #64748b;
}
.mm-meta-live {
    font-size: .75rem;
    color: #16a34a;
    font-weight: 600;
}

/* Scoreboard */
.match-modal-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 16px 16px;
}
.mms-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mms-logo {
    width: 56px; height: 56px;
    object-fit: contain;
    border-radius: 4px;
}
.mms-logo-placeholder {
    width: 56px; height: 56px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; color: #aaa;
}
.mms-name {
    font-size: .82rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

/* "Prati ekipu" dugme (web push) */
.mms-follow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    padding: 5px 11px;
    border: 1px solid #d8d8d8;
    border-radius: 16px;
    background: #fff;
    color: #444;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    -webkit-user-select: none;
    user-select: none;
}
.mms-follow:hover { background: #f4f7ff; border-color: #b9cdfb; }
.mms-follow:disabled { opacity: .6; cursor: default; }
.mms-follow--on {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}
.mms-follow--on:hover { background: #1664cf; border-color: #1664cf; }
.mms-follow-ic { font-size: .85rem; line-height: 1; }

.mms-follow-note {
    margin: 12px 16px 0;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fff7e6;
    border: 1px solid #ffe2a8;
    color: #7a5b00;
    font-size: .78rem;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity .2s, max-height .2s;
}
.mms-follow-note--show { opacity: 1; max-height: 120px; }

.mms-center {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.mms-result {
    font-size: 2.4rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -1px;
    line-height: 1;
}
.mms-result--pending { color: #bbb; font-size: 1.8rem; }
.mms-pen {
    font-size: .72rem;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}
.mms-vs { font-size: .9rem; color: #bbb; font-weight: 600; }
.mms-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 1.05rem; font-weight: 800; color: #16a34a;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    padding: 6px 14px; border-radius: 20px;
}
.mms-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: mms-pulse 1.4s infinite; }
@keyframes mms-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Goals list */
.match-modal-goals {
    padding: 0 16px 16px;
}
.mmg-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin-bottom: 8px;
    text-align: center;
}
.mmg-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.mmg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    background: #fafafa;
    font-size: .82rem;
}
.mmg-row--away { flex-direction: row-reverse; text-align: right; }
.mmg-minute {
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: #aaa;
    border-radius: 10px;
    padding: 1px 6px;
    flex-shrink: 0;
}
.mmg-minute--goal { background: #27ae60; }
.mmg-minute--own  { background: #e74c3c; }
.mmg-minute--pen  { background: #f39c12; }
.mmg-minute--card { background: #64748b; }
.mmg-player { font-weight: 500; flex: 1; }
.mmg-type   { font-size: .7rem; color: #aaa; }
.mmg-card-icon { font-size: .8rem; flex-shrink: 0; }
.mmg-empty  { text-align: center; color: #bbb; font-size: .82rem; padding: 8px; }

.match-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #555;
    line-height: 1;
}
.match-modal-close:hover { background: #e0e0e0; }

/* Kartica — klikabilna (subtilno) */
.match-card { cursor: pointer; }
.match-card:active { transform: scale(.98); }

/* ─── Footer ──────────────────────────────────────────────── */

.pub-footer {
    background: #fff;
    border-top: 1px solid var(--color-border);
    text-align: center;
    padding: 16px;
    font-size: .8125rem;
    color: var(--color-text-2);
    margin-top: 40px;
    margin-bottom: 58px;
}
.pub-register-link {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 18px;
    background: var(--color-primary, #1a5c2a);
    color: #fff !important;
    border-radius: 22px;
    font-weight: 600;
    font-size: .85rem;
}
.pub-register-link:hover { opacity: .92; }
