/* =========================================================
   tippmodern.css
   Tippspiel – modernes Design im Stil von leichtathletikforum.com
   
   Farbpalette:
     --primary:      #1F6B8E   sattes Sportportal-Blau
     --primary-dark: #165a78   Hover/aktiv
     --primary-bg:   #e8f2f7   sehr helles Blau für Highlights
     --accent-gold:  #c8960c   Gold
     --accent-silver:#7a8a96   Silber
     --accent-bronze:#a0522d   Bronze
     --bg-page:      #f0f4f7   leicht getönter Seitenhintergrund
     --bg-card:      #ffffff
     --border:       #d6e0e8
     --text:         #1a2530
     --text-muted:   #5a6a78
   ========================================================= */

/* ── CSS Custom Properties ─────────────────────────────── */
#content .tipp-page {
    --primary:        #1F6B8E;
    --primary-dark:   #165a78;
    --primary-light:  #2a85ad;
    --primary-bg:     #e8f2f7;
    --primary-border: #a8cfe0;

    --accent-gold:    #c8960c;
    --accent-gold-bg: #fdf6e3;
    --accent-silver:  #6b7c8a;
    --accent-silver-bg: #f2f4f6;
    --accent-bronze:  #9a4f2a;
    --accent-bronze-bg: #fdf0ea;

    --bg-page:        #f0f4f7;
    --bg-card:        #ffffff;
    --bg-controls:    #eaf1f6;

    --border:         #d0dde8;
    --border-card:    #dce8f0;

    --text:           #1a2530;
    --text-muted:     #5a6a78;
    --text-light:     #8a9aaa;

    --radius-sm:      4px;
    --radius:         8px;
    --radius-lg:      12px;

    --shadow-card:    0 2px 6px rgba(31,107,142,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-hover:   0 4px 14px rgba(31,107,142,0.14), 0 2px 4px rgba(0,0,0,0.08);
}

/* ── Seiten-Wrapper ─────────────────────────────────────── */
#content .tipp-page {
    max-width: 1100px;
    padding: 0 16px;
    padding-top: 16px;   /* Abstand nach oben zum MyBB-Breadcrumb */
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 0.82rem;
    color: var(--text);
    background: var(--bg-page);
    border-radius: var(--radius);
}

/* MyBB-Klassen neutralisieren */
#content .tipp-page table,
#content .tipp-page .trow1,
#content .tipp-page .trow2,
#content .tipp-page .thead,
#content .tipp-page .tcat {
    all: unset;
}

/* all:unset setzt display zurück – Tabellen brauchen display:table + volle Breite */
#content .tipp-page table {
    display: table;
    width: 100%;
    box-sizing: border-box;
}

/* ── Minimaler Header / Lock-Hinweis ────────────────────── */
.tipp-header {
    margin-bottom: 0;   /* tipp-header-Wrapper entfällt im Template */
}

.tipp-lockhint {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #fff8e1;
    border-left: 4px solid #f0a500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    margin-top: 0;         /* Abstand kommt von padding-top auf .tipp-page */
    margin-bottom: 12px;   /* Abstand zum tipp-controls */
}

/* Leeren lockhint ausblenden */
.tipp-lockhint:empty {
    display: none;
    margin: 0;
}

/* ── Controls-Leiste (Name + Einstellungen) ─────────────── */
.tipp-controls {
    background: var(--bg-controls);
    padding: 8px 14px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    margin-top: 0;         /* Abstand kommt von padding-top auf .tipp-page */
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
}

/* Wenn sichtbarer lockhint direkt davor steht: kein Doppelabstand */
.tipp-lockhint:not(:empty) + .tipp-controls {
    margin-top: 0;
}

.tipp-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tipp-controls-left {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.tipp-controls-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.tipp-control-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.tipp-control-item label {
    margin-left: 2px;
    cursor: pointer;
}

.playhidden-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ph-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ph-option {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* ── Sections (Männer / Frauen) ─────────────────────────── */
.tipp-section {
    margin-bottom: 20px;
}

/* Vollbreiter Balken – sportlich, klar */
.tipp-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary);
    padding: 5px 12px;
    margin: 0 0 6px 0;
    border-radius: var(--radius-sm);
}

/* Kleines Dekor-Element links im Balken */
.tipp-section h2::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 1em;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    flex-shrink: 0;
}

.tipp-section-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Cards ──────────────────────────────────────────────── */
.tipp-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 6px 12px 8px;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tipp-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-border);
}

.tipp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.tipp-title {
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--text);
}

.tipp-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Karte mit Countdown-Warnung */
.tipp-card-warning {
    border-left: 4px solid var(--primary);
    background: var(--primary-bg);
}

.tipp-card-warning .tipp-card-header {
    border-bottom-color: var(--primary-border);
}

/* ── Badges ─────────────────────────────────────────────── */
.tipp-badge-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff3cd;
    color: #7a5000;
    border: 1px solid #f0c040;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.tipp-badge-admin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Countdown */
.tipp-countdown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-bg);
    border: 1px solid var(--primary-border);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Selects-Grid (Gold / Silber / Bronze) ──────────────── */
.tipp-selects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

/* Jede Select-Gruppe bekommt ein farbiges Label-Band oben */
.tipp-select-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);   /* für den Rahmen selbst */
    overflow: hidden;               /* Ecken sichtbar machen */
    position: relative;
}


/* Label-Band: Gold / Silber / Bronze */
.tipp-select-group::before {
    content: attr(data-medal);
    display: block;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius) var(--radius) 0 0;  /* obere Ecken abrunden */
}

/* Gold */
.tipp-select-group:nth-child(1) {
    border-color: #e8c84a;
}
.tipp-select-group:nth-child(1)::before {
    background: var(--accent-gold-bg);
    color: var(--accent-gold);
    border-bottom: 1px solid #e8c84a;
    content: "🥇  Gold";
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Silber */
.tipp-select-group:nth-child(2) {
    border-color: #b0bec5;
}
.tipp-select-group:nth-child(2)::before {
    background: var(--accent-silver-bg);
    color: var(--accent-silver);
    border-bottom: 1px solid #b0bec5;
    content: "🥈  Silber";
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Bronze */
.tipp-select-group:nth-child(3) {
    border-color: #c8956a;
}
.tipp-select-group:nth-child(3)::before {
    background: var(--accent-bronze-bg);
    color: var(--accent-bronze);
    border-bottom: 1px solid #c8956a;
    content: "🥉  Bronze";
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Native Select (Fallback) */
.tipp-select-group select {
    width: 100%;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-family: inherit;
    border: none;
    border-radius: 0 0 var(--radius) var(--radius);  /* untere Ecken abrunden */
    background: #fff;
    color: var(--text);
    outline: none;
    cursor: pointer;
}

.tipp-select-group select:focus {
    background: var(--primary-bg);
    box-shadow: inset 0 0 0 2px var(--primary);
}

.tipp-select-group select:disabled {
    background: #f5f5f5;
    color: var(--text-light);
    cursor: not-allowed;
}

/* ── Footer (Speichern-Button) ──────────────────────────── */
.tipp-footer {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.tipp-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(31,107,142,0.25);
    margin-bottom: 8px;
}

.tipp-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(31,107,142,0.35);
    transform: translateY(-1px);
}

.tipp-submit:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(31,107,142,0.2);
}

/* ── Flaggen-Auswahl (Akkordeon, kein Overlay) ─────────────── */
.tipp-flag-select {
    width: 100%;
    font-size: 0.88rem;
    user-select: none;
}

/* Anzeige-Box */
.tipp-flag-selected {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 26px 4px 8px;
    border: none;          /* kein eigener Border – der kommt vom .tipp-select-group */
    border-radius: 0 0 var(--radius) var(--radius);  /* untere Ecken abrunden */
    background: #fff url("data:image/svg+xml;utf8,<svg fill='%235a6a78' height='10' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M1 3l4 4 4-4z'/></svg>") no-repeat right 8px center;
    cursor: pointer;
    min-height: 28px;
    box-sizing: border-box;
    transition: background 0.12s;
    width: 100%;
}

.tipp-flag-selected:hover {
    background-color: var(--primary-bg);
}

.tipp-flag-select.open .tipp-flag-selected {
    background-color: var(--primary-bg);
}

/* Open-State: Wrapper-Border hervorheben */
.tipp-select-group:has(.tipp-flag-select.open) {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Flaggen-Bilder */
.tipp-flag-selected img,
.tipp-flag-option img {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}

.tipp-flag-placeholder {
    display: inline-block;
    width: 18px;
    height: 12px;
    background: #dde4ea;
    border-radius: 2px;
    flex-shrink: 0;
}

.tipp-flag-selected-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    font-size: 0.8rem;
}

.tipp-flag-selected-label.placeholder {
    color: var(--text-light);
    font-style: italic;
}

/* Suchfeld (nur bei geöffneter Liste sichtbar) */
.tipp-flag-search {
    display: none;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    font-size: 0.8rem;
    font-family: inherit;
    border: none;
    border-top: 2px solid var(--primary);
    outline: none;
    background: #fbfdfe;
    color: var(--text);
}

.tipp-flag-select.open .tipp-flag-search {
    display: block;
}

/* Liste: klappt inline im normalen Dokumentfluss auf (kein position:fixed/
   absolute) – dadurch unabhängig von Pinch-Zoom/Viewport-Verschiebungen
   auf Mobilgeräten. */
.tipp-flag-list {
    display: none;
    background: #fff;
    border-top: 1px solid var(--primary-border);
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    max-height: 280px;
    overflow-y: auto;
}

.tipp-flag-select.open .tipp-flag-list {
    display: block;
}

/* Einzelne Option */
.tipp-flag-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text);
    transition: background 0.08s;
    border-bottom: 1px solid #f0f4f7;
}

.tipp-flag-option:last-child {
    border-bottom: none;
}

.tipp-flag-option:hover {
    background: var(--primary-bg);
}

.tipp-flag-option.selected {
    background: #d4eaf5;
    font-weight: 600;
    color: var(--primary-dark);
}

.tipp-flag-nation {
    font-size: 0.75rem;
    color: var(--text-light);
    flex-shrink: 0;
    font-variant: small-caps;
    letter-spacing: 0.04em;
}

/* Disabled */
.tipp-flag-select.disabled .tipp-flag-selected {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.65;
}

/* Scrollbar */
.tipp-flag-list::-webkit-scrollbar { width: 5px; }
.tipp-flag-list::-webkit-scrollbar-track { background: #f0f4f7; }
.tipp-flag-list::-webkit-scrollbar-thumb { background: var(--primary-border); border-radius: 3px; }
.tipp-flag-list::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {

    /* Selects untereinander auf kleinen Screens */
    .tipp-selects {
        grid-template-columns: 1fr;
    }
    .tipp-card {
        padding: 5px 10px 6px;
    }

    /* Controls umbrechen */
    .tipp-controls-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tipp-controls-right {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Footer-Buttons volle Breite */
    .tipp-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .tipp-submit {
        justify-content: center;
    }

    /* Card-Header umbrechen */
    .tipp-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    #content .tipp-page {
        padding: 0 8px;
    }

    .tipp-card {
        padding: 8px 12px 10px;
    }
}

/* ── Forum-Theme auf dieser Seite responsive erzwingen ──────
   Das Theme liefert kein viewport-Meta und pinnt #container,
   .topbar, #headerimage, #schatten_oben sowie mehrere Boxen fest
   auf ~1020-1090px. Da tippmodern.css ausschließlich auf dieser
   Seite geladen wird, wirken diese Overrides nirgends sonst im
   Forum – auf Desktop ändert die Media Query nichts. */
@media (max-width: 1020px) {
    #container {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Kompakter Mobile-Header: Bild-Logo, Headerbild, Navigationslinks
       (Home/Forums/.../Hilfe) und der "neue Beiträge"-Hinweis werden auf
       dieser Seite nicht gebraucht. Übrig bleibt nur eine schlanke Zeile
       mit Text-Wortmarke + Tagline. */
    .topbar {
        width: 100% !important;
        height: auto !important;
        padding: 8px 14px !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    #logoimg {
        float: none;
        margin: 0;
    }

    /* Bild-Logo ausblenden, stattdessen Text-Wortmarke via ::before */
    #logoimg img {
        display: none;
    }

    #logoimg a {
        display: inline-block;
        font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
        font-weight: 800;
        font-size: 1.1rem;
        letter-spacing: -0.01em;
        color: #fff;
        text-decoration: none;
    }

    #logoimg a::before {
        content: "Leichtathletikforum.com";
    }

    /* Tagline dezent unter der Wortmarke */
    #claim {
        position: static;
        float: none;
        clear: both;
        margin: 1px 0 0 0;
        font-size: 0.7rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.7);
    }

    #headerimage,
    #schatten_oben,
    .mmenu,
    #Weltranglistenrechner,
    #lade-link,
    .neuestebeitraege,
    .welcome_back,
    .navMenu,
    .breadcrumb {
        display: none !important;
    }

    /* Das Theme setzt direkt nach .navMenu und nach der
       .breadcrumb-fieldset je ein eigenständiges <br />. Die
       display:none-Regeln oben blenden nur die Container aus –
       die <br />-Geschwister bleiben sichtbar und erzeugen sonst
       unnötige Leerzeilen. */
    .navMenu + br,
    .breadcrumb + br {
        display: none !important;
    }
}

/* ── tippuebersicht.php: Mobile-Layout ──────────────────────
   Die .tueb-* Klassen kommen nur auf dieser Seite vor (inline
   <style> im TippUebersichtModern-Template), daher wirken diese
   Regeln nirgends sonst. Die vorhandene @media(900px)-Regel
   ".tueb-top-wrapper { grid-column: 1/-1; }" greift nie, weil
   diese Klasse im Template gar nicht existiert – die Top-10-Karte
   sitzt direkt als zweite Grid-Spalte. Ab 900px daher direkt auf
   die tatsächliche Struktur (Card 1 / Card 2 / .tueb-sidebar)
   umstellen statt auf die nie vorhandene Wrapper-Klasse zu warten. */
@media (max-width: 900px) {
    .tueb-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1020px) {
    .tueb-toolbar {
        gap: 6px;
    }

    .tueb-select {
        flex: 1 1 100%;
        max-width: none;
    }

    .tueb-btn.action {
        margin-left: 0;
    }

    .tueb-admin {
        font-size: 0.72rem;
    }

    .tueb-table {
        font-size: 0.78rem;
    }

    .tueb-table td {
        padding: 6px 6px;
    }

    .tueb-name-sub {
        display: none;
    }

    .tueb-sidebar {
        position: static;
    }
}

/* ── tippuebersicht.php: Tipper-Anzahl-Card (mittlere Spalte) ── */
.tueb-stat {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
}

.tueb-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.tueb-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
