/*
 * Total Stockcar Fantasy - Typography & Base Styles
 * Orientiert an klassischem Design, modernisiert für Lesbarkeit
 */

/* === Basis-Schrift === */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;
    font-size: 0.875rem; /* 14px bei 16px base */
    line-height: 1.6;
    color: #313131;
    background-color: #ebefe5;
}

/* === Absätze mit Blocksatz === */
p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* === Überschriften === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
}

h1 {
    font-size: 1.5rem; /* 24px */
    color: #273a00;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.25rem; /* 20px */
    color: #273a00;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    color: #434343;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    color: #7b9403;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid #7b9403;
}

h5 {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: #666666;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: #7d7d7d;
    margin-bottom: 0.5rem;
}

/* === Absätze & Text === */
p {
    margin-bottom: 0.875rem;
}

.text-justify {
    text-align: justify;
}

.text-muted {
    color: #7d7d7d !important;
}

/* === Links === */
a {
    color: #7b9403;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #364a01;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #7b9403;
    outline-offset: 2px;
}

/* Link-Varianten */
a.link-light {
    color: #7d7d7d;
}

a.link-light:hover {
    color: #434343;
}

/* === Wichtige Texte === */
.important, .text-danger {
    color: #e2001a !important;
}

strong, b {
    font-weight: 700;
    color: #273a00;
}

/* === Listen === */
ul, ol {
    margin-bottom: 0.875rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

/* === Container & Content === */
.content-wrapper {
    background-color: white;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 4px;
}

/* === Tabellen-Design-System === */
/* Einheitliches Tabellen-Layout für die gesamte Website */

.table {
    /* System-UI Stack via body; Tabellen erben diese Schrift */
    font-size: 12px; /* Inhaltsschrift in Tabellen: 12px */
    border-collapse: collapse;
    border: 2px solid #999999;
}

/* Standard-Tabellenkopf: dunkles Grün */
.table thead th {
    font-weight: 700;
    font-size: 12px; /* vereinheitlicht auf 12px */
    color: #ffffff;
    background-color: #273a00;
    border: 1px solid #1a2600;
    padding: 0.75rem 0.875rem;
    vertical-align: middle;
}

/* Alternative helle Kopfzeile */
.table thead.table-light th {
    color: #273a00;
    background-color: #f8f9fa;
    border: 1px solid #999999;
    font-weight: 700;
    font-size: 12px;
}

/* Tabellenzellen */
.table td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
    border: 1px solid #cccccc;
    background-color: #ffffff;
}

/* Einheitlicher Hintergrund für alle Zeilen */
.table > tbody > tr > * {
    background-color: #ffffff;
}

/* Hover-Effekt */
.table-hover > tbody > tr:hover > * {
    background-color: #e8f4d4 !important;
    transition: background-color 0.15s ease-in-out;
}

/* Hervorhebung: Nächstes anstehendes Rennen (helles Gelb) */
.table > tbody > tr.race-next > * {
    background-color: #fffbea !important;
    border-left: 3px solid #ffc107;
}

/* Status-Zeilen: Freigegeben/Offiziell (helles Grün) */
.table > tbody > tr.table-success > * {
    background-color: #e8f5e9 !important;
}

/* Status-Zeilen: Eingegeben/Inoffiziell (helles Orange) */
.table > tbody > tr.table-warning > * {
    background-color: #fff3e0 !important;
}

.table > tbody > tr.table-danger > * {
    background-color: #f8d7da !important;
}

/* Responsive Wrapper */
.table-responsive {
    border-radius: 4px;
    overflow-x: auto;
}

/* Zellausrichtungen */
.table .text-center {
    text-align: center;
}

.table .text-end {
    text-align: right;
}

/* Kompakte Tabellen-Variante */
.table-sm td, .table-sm th {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
}

/* === Cards === */
.card {
    font-size: 0.875rem;
}

.card-header {
    font-weight: 600;
}

/* === Buttons === */
.btn {
    font-size: 0.875rem;
}

/* === Badges === */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
}

/* === Alerts === */
.alert {
    font-size: 0.875rem;
}

.alert h5, .alert h6 {
    margin-top: 0;
}

/* === Utility Headings === */
.heading-dark {
    color: #434343 !important;
}
