/* ÖLV Live Ergebnisse – Styles */

body {
    -webkit-tap-highlight-color: transparent;
}

/* NEU: Verhindert, dass sich die gesamte Seite auf Handy/Tablet horizontal verschieben lässt.
   FIX: "clip" statt "hidden" - hidden auf html UND body macht den body zu einem eigenen
   Scroll-Container, was ein paar Pixel unnötiges vertikales Scrollen erzeugt ("hidden" bleibt
   nur als Fallback für alte Browser ohne clip-Unterstützung). */
html, body {
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
}

/* FIX: min-h-screen (100vh) ist auf Handys höher als der sichtbare Bereich (Adressleiste) ->
   Seite war immer minimal scrollbar. 100dvh = tatsächlich sichtbare Höhe. */
body.min-h-screen {
    min-height: 100vh;
    min-height: 100dvh;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Athleten - Anpassung für Karten-Look */
#athleten-liste-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Etwas mehr Abstand zwischen den Karten */
    padding: 20px;
}

.athlet-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0; /* Dezenter Rahmen */
    border-radius: 12px;       /* Die abgerundeten Ecken */
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Leichter Schatten für Tiefe */
}

.athlet-card:hover {
    background-color: #fcfcfc;
    border-color: #d32f2f;      /* Roter Rahmen beim Drüberfahren */
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.15); /* Rötlicher Schatten beim Hover */
}
/* Damit der aktive Button rot und der inaktive grau ist */
.btn-aktiv { background-color: #dc2626 !important; color: white !important; }
.btn-inaktiv { background-color: #f3f4f6 !important; color: #4b5563 !important; }

/* style.css hinzufügen */
.card-style {
    background-color: white;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.primary-btn {
    background-color: #dc2626; /* primary */
    color: white;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

/* Weicher Glow bei Fokus für alle wichtigen Formularfelder */
input:focus, select:focus {
    outline: none !important;
    border-color: #dc2626 !important; /* Dein primary rot */
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
    transition: all 0.2s ease-in-out;
}

/* Tabellen-Hover Effekt "Verschärfen" - GEÄNDERT (22.11.2026): nur Datenzeilen, nicht die (dunkle) Kopfzeile,
   sonst wurde der Kopf bei Rekorden/Cups beim Drüberfahren rosa und die weiße Schrift unlesbar */
tbody tr:hover {
    background-color: #fef2f2 !important; /* ganz leichtes Rot */
    transition: background-color 0.1s ease;
}
/* Aktiver Tab in der Wettkampfbüro-Leiste: rotes Glühen, gleiches Rot wie primary */
.bv-tab-active {
    background-color: #fef2f2; /* red-50 */
    color: #dc2626;            /* gleiches Rot wie primary-btn */
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* NEU: 3 Pflicht-Unterlagen (Reisepass, Meldezettel, Athletenformular) beim Athleten anlegen */
.td-dok-box { border: 1px dashed #fca5a5; background: #fff7f7; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; transition: all .15s; }
.td-dok-box.ok { border: 1px solid #a7f3d0; background: #f0fdf4; }
.td-dok-box.ziel { border-color: #dc2626; background: #fef2f2; }
.td-dok-kopf { display: flex; align-items: center; gap: 10px; }
.td-dok-status { width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; background: #fee2e2; color: #b91c1c; }
.td-dok-box.ok .td-dok-status { background: #10b981; color: #fff; }
.td-dok-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.td-dok-titel b { font-size: 13px; font-weight: 800; color: #111827; }
.td-dok-titel span { font-size: 11px; color: #6b7280; }
.td-dok-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 9px; border: 1px solid #e5e7eb; background: #fff; font-size: 11px; font-weight: 800; color: #374151; cursor: pointer; white-space: nowrap; }
.td-dok-btn:hover { border-color: rgba(220, 38, 38, 0.4); color: #dc2626; }
.td-dok-datei { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #fff; border: 1px solid #f3f4f6; }
.td-dok-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 12.5px; font-weight: 600; color: #1f2937; }
button.td-dok-name:hover { color: #dc2626; }

/* NEU: Dropdown "Mitgliederverwaltung" im Vereins-Dashboard */
.td-mv-wrap { position: relative; }
.td-mv-menue { position: absolute; top: calc(100% + 6px); left: 0; z-index: 96; min-width: 230px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12); padding: 6px; }
.td-mv-menue button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #374151; text-align: left; white-space: nowrap; }
.td-mv-menue button.hidden { display: none; } /* Einträge ohne Recht ausblenden (display:flex oben überstimmt sonst .hidden) */
.td-mv-menue button:hover { background: #fef2f2; color: #dc2626; }
@media (max-width: 640px) { .td-mv-menue { left: auto; right: 0; } }

/* NEU: "Nennen" / "Fehlende Leistung melden" klein und dezent rechts in der Kopfkarte einer Veranstaltung */
.wk-kopf-aktionen { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex-shrink: 0; }
.wk-kopf-aktion { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; font-size: 11px; font-weight: 700; color: #4b5563; white-space: nowrap; transition: all .15s; }
.wk-kopf-aktion svg { width: 13px; height: 13px; }
.wk-kopf-aktion:hover { border-color: rgba(220, 38, 38, 0.4); color: #dc2626; }
.wk-kopf-aktion.wk-kopf-aktion-haupt { background: #dc2626; border-color: #dc2626; color: #fff; }
.wk-kopf-aktion.wk-kopf-aktion-haupt:hover { background: #b91c1c; color: #fff; }
html.dark .wk-kopf-aktion { background: #18181b; border-color: #27272a; color: #d4d4d8; }
/* Handy: Knöpfe rutschen unter die Kopfdaten (nebeneinander), statt rechts gequetscht zu werden */
@media (max-width: 640px) {
    .flex:has(> .wk-kopf-aktionen) { flex-wrap: wrap; }
    .wk-kopf-aktionen { width: 100%; flex-direction: row; flex-wrap: wrap; }
}
/* ======================================================================
   NEU (11/2026): WETTKAMPFKALENDER (PACE > Wettkämpfe, Umschalter "Liste | Kalender")
   Logik: wkKalenderRendern() in script.js. Farben über die --sh-* Variablen (hell/dunkel automatisch).
   ====================================================================== */
.wk-ansicht { display: inline-flex; gap: 2px; padding: 3px; background: var(--sh-flaeche-2, #f4f4f5); border: 1px solid var(--sh-rand, #e4e4e7); border-radius: 10px; }
.wk-ansicht button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--sh-text-2, #52525b); padding: 6px 12px; border-radius: 8px; transition: all .15s; }
.wk-ansicht button svg { width: 15px; height: 15px; }
.wk-ansicht button:hover { color: var(--sh-text, #111114); }
.wk-ansicht button.aktiv { background: var(--sh-flaeche, #fff); color: var(--sh-rot, #dc2626); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.wkk { background: var(--sh-flaeche, #fff); border: 1px solid var(--sh-rand, #e4e4e7); border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); overflow: hidden; }
.wkk-kopf { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--sh-rand, #e4e4e7); }
.wkk-titel { flex: 1; text-align: center; font-size: 18px; font-weight: 800; color: var(--sh-text, #111114); text-transform: capitalize; letter-spacing: -.01em; }
.wkk-nav { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--sh-text-2, #52525b); border: 1px solid var(--sh-rand, #e4e4e7); transition: all .15s; }
.wkk-nav:hover { color: var(--sh-rot, #dc2626); border-color: var(--sh-rot, #dc2626); }
.wkk-nav svg { width: 18px; height: 18px; }
.wkk-heute-btn { font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--sh-rand, #e4e4e7); color: var(--sh-text-2, #52525b); }
.wkk-heute-btn:hover { color: var(--sh-rot, #dc2626); border-color: var(--sh-rot, #dc2626); }

.wkk-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wkk-wt { padding: 8px 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sh-text-3, #8b8b94); text-align: center; border-bottom: 1px solid var(--sh-rand, #e4e4e7); }
.wkk-tag { min-height: 108px; padding: 6px; border-right: 1px solid var(--sh-rand, #e4e4e7); border-bottom: 1px solid var(--sh-rand, #e4e4e7); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .12s; outline: none; }
.wkk-tag:nth-child(7n + 7) { border-right: 0; }
.wkk-tag:hover { background: var(--sh-flaeche-2, #f4f4f5); }
.wkk-tag:focus-visible { box-shadow: inset 0 0 0 2px var(--sh-rot, #dc2626); }
.wkk-fremd { background: color-mix(in srgb, var(--sh-flaeche-2, #f4f4f5) 55%, transparent); }
.wkk-fremd .wkk-nr { opacity: .4; }
.wkk-fremd .wkk-chip { opacity: .55; }
.wkk-nr { font-size: 12px; font-weight: 700; color: var(--sh-text-2, #52525b); width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; flex-shrink: 0; }
.wkk-heute .wkk-nr { background: var(--sh-rot, #dc2626); color: #fff; }
.wkk-gewaehlt { background: color-mix(in srgb, var(--sh-rot, #dc2626) 8%, transparent) !important; box-shadow: inset 0 0 0 2px var(--sh-rot, #dc2626); }
.wkk-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wkk-chip { display: block; width: 100%; text-align: left; font-size: 11px; font-weight: 700; line-height: 1.25; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid currentColor; transition: filter .12s; }
.wkk-chip:hover { filter: brightness(.95); text-decoration: underline; }
.wkk-weiter { opacity: .6; margin-right: 3px; }
.wkk-abgesagt { text-decoration: line-through; opacity: .6; }
.wkk-mehr { font-size: 11px; font-weight: 700; color: var(--sh-text-3, #8b8b94); padding-left: 4px; }
.wkk-punkte { display: none; gap: 3px; flex-wrap: wrap; justify-content: center; }
.wkk-punkt { width: 7px; height: 7px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.wkk-punkt-mehr { font-size: 10px; font-weight: 800; line-height: 7px; color: var(--sh-text-3, #8b8b94); }

/* Farben je Veranstaltungsart (Textfarbe = Akzent, Hintergrund = zarter Ton) */
.wkk-f-intm  { color: #b91c1c; background-color: #fee2e2; }
.wkk-f-int   { color: #6d28d9; background-color: #ede9fe; }
.wkk-f-lm    { color: #b45309; background-color: #fef3c7; }
.wkk-f-nat   { color: #1d4ed8; background-color: #dbeafe; }
.wkk-f-sonst { color: #52525b; background-color: #f4f4f5; }
html.dark .wkk-f-intm  { color: #fca5a5; background-color: rgba(220,38,38,.18); }
html.dark .wkk-f-int   { color: #c4b5fd; background-color: rgba(124,58,237,.2); }
html.dark .wkk-f-lm    { color: #fcd34d; background-color: rgba(217,119,6,.18); }
html.dark .wkk-f-nat   { color: #93c5fd; background-color: rgba(37,99,235,.2); }
html.dark .wkk-f-sonst { color: #d4d4d8; background-color: rgba(255,255,255,.08); }
/* Punkte und Balken: volle Akzentfarbe */
.wkk-punkt.wkk-f-intm, .wkk-punkt.wkk-f-int, .wkk-punkt.wkk-f-lm, .wkk-punkt.wkk-f-nat, .wkk-punkt.wkk-f-sonst,
.wkk-eintrag-balken.wkk-f-intm, .wkk-eintrag-balken.wkk-f-int, .wkk-eintrag-balken.wkk-f-lm, .wkk-eintrag-balken.wkk-f-nat, .wkk-eintrag-balken.wkk-f-sonst,
html.dark .wkk-punkt[class*="wkk-f-"], html.dark .wkk-eintrag-balken[class*="wkk-f-"] { background-color: currentColor; }

.wkk-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--sh-rand, #e4e4e7); font-size: 12px; color: var(--sh-text-2, #52525b); }
.wkk-leg { display: inline-flex; align-items: center; gap: 6px; }

.wkk-tagesliste { margin-top: 14px; background: var(--sh-flaeche, #fff); border: 1px solid var(--sh-rand, #e4e4e7); border-radius: 14px; overflow: hidden; }
.wkk-tagesliste-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; font-weight: 800; color: var(--sh-text, #111114); border-bottom: 1px solid var(--sh-rand, #e4e4e7); }
.wkk-x { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--sh-text-3, #8b8b94); }
.wkk-x:hover { background: var(--sh-flaeche-2, #f4f4f5); color: var(--sh-text, #111114); }
.wkk-x svg { width: 16px; height: 16px; }
.wkk-eintrag { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--sh-rand, #e4e4e7); transition: background .12s; }
.wkk-eintrag:last-child { border-bottom: 0; }
.wkk-eintrag:hover { background: var(--sh-flaeche-2, #f4f4f5); }
.wkk-eintrag:hover .wkk-eintrag-name { color: var(--sh-rot, #dc2626); }
.wkk-eintrag-balken { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.wkk-eintrag-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wkk-eintrag-name { font-weight: 700; color: var(--sh-text, #111114); transition: color .12s; }
.wkk-eintrag-meta { font-size: 13px; color: var(--sh-text-3, #8b8b94); }
.wkk-eintrag-status { margin-top: 4px; }
.wkk-pfeil { width: 18px; height: 18px; color: var(--sh-text-3, #8b8b94); flex-shrink: 0; }
.wkk-leer { padding: 16px 14px; font-size: 14px; color: var(--sh-text-3, #8b8b94); }

/* Handy: Zellen nur mit Farbpunkten, Details per Tipp auf den Tag (Tagesliste darunter) */
@media (max-width: 640px) {
    .wkk-tag { min-height: 58px; padding: 4px 2px; align-items: center; }
    .wkk-chips { display: none; }
    .wkk-punkte { display: flex; }
    .wkk-titel { font-size: 16px; }
    .wkk-wt { font-size: 10px; padding: 6px 2px; letter-spacing: 0; }
    .wkk-heute-btn { padding: 7px 9px; }
    .wk-ansicht button { padding: 6px 10px; }
}
