/**
 * RapidArchiv - Print Stylesheet
 * Nur aktiv beim Drucken (media="print")
 */

/* === GRUNDEINSTELLUNGEN === */
* {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Alle Gradienten entfernen */
*[style*="linear-gradient"],
*[style*="radial-gradient"] {
    background: white !important;
}

/* Dekorative Pseudo-Elemente global ausblenden */
.form-item::before,
.form-item::after,
.form-tooltip::before,
.form-tooltip::after {
    display: none !important;
}

body {
    font-size: 11pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

/* === AUSBLENDEN === */
nav,
.site-nav,
.nav-toggle,
footer,
.site-footer,
.header-form,
.header-stats,
.breadcrumb,
.team-buttons,
.team-filter,
.filter-bar,
.pagination,
.back-link,
.back-to-list,
.no-print,
button,
.btn,
input[type="submit"],
.search-box,
.search-form,
.theme-toggle,
/* Spieler-Detail spezifisch */
.timeline,
.timeline-bar,
.career-timeline,
.title-icon,
.trophy-icon,
svg.icon,
/* Links mit Pfeil */
a[href*="players.php"]:has(svg),
p:has(> a[href*="players.php"]) {
    display: none !important;
}

/* === HEADER VEREINFACHEN === */
.site-header {
    border-bottom: 2px solid black;
    padding: 10pt 0;
    margin-bottom: 15pt;
}

.site-header .container {
    display: block;
    text-align: center;
}

/* Wappen ausblenden im Druck */
.site-logo {
    display: none !important;
}

.site-title h1 {
    font-size: 24pt;
    font-weight: bold;
    margin: 0;
    /* Textgradient für Druck deaktivieren */
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: black !important;
    color: black !important;
}

.site-title h1 a {
    color: black !important;
    -webkit-text-fill-color: black !important;
}

.site-title p {
    font-size: 11pt;
    margin: 3pt 0 0 0;
    display: block !important;
}

.site-title a {
    text-decoration: none !important;
}

/* === LAYOUT === */
.container,
main {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* === ÜBERSCHRIFTEN === */
h1 { font-size: 16pt; margin: 0 0 10pt 0; }
h2 { font-size: 14pt; margin: 15pt 0 8pt 0; }
h3 { font-size: 12pt; margin: 10pt 0 5pt 0; }

/* === LINKS === */
a {
    text-decoration: none !important;
}

/* URLs nach Links anzeigen (optional) */
a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666 !important;
}

/* Interne Links ohne URL */
a[href^="/"]:after,
a[href^="#"]:after {
    content: none;
}

/* === TABELLEN === */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    page-break-inside: auto;
}

tr {
    page-break-inside: avoid;
    page-break-after: auto;
}

th, td {
    border: 0.5pt solid #333;
    padding: 3pt 5pt;
    text-align: left;
}

th {
    font-weight: bold;
    background: #eee !important;
}

/* Zebra-Streifen für bessere Lesbarkeit */
tbody tr:nth-child(even) {
    background: #f5f5f5 !important;
}

/* === KARTEN/CARDS === */
.card,
.stat-card,
.match-card {
    border: 0.5pt solid #ccc;
    padding: 8pt;
    margin-bottom: 10pt;
    page-break-inside: avoid;
}

/* Dekorative Card-Elemente ausblenden */
.card::before,
.card::after {
    display: none !important;
}

/* === SPIELDETAILS === */
.match-header {
    border: 1pt solid black;
    padding: 10pt;
    margin-bottom: 15pt;
}

.match-score {
    font-size: 24pt;
    font-weight: bold;
}

/* === SPIELERLISTEN === */
.lineup-grid,
.player-grid {
    display: block;
}

.lineup-column {
    display: inline-block;
    vertical-align: top;
    width: 48%;
}

/* === FARBCODIERUNG ERHALTEN (als Graustufen) === */
.result-win,
.form-win {
    background: #e0e0e0 !important;
}

.result-loss,
.form-loss {
    background: #f0f0f0 !important;
    font-style: italic;
}

/* === SEITENUMBRÜCHE === */
h1, h2, h3 {
    page-break-after: avoid;
}

.page-break {
    page-break-before: always;
}

/* Keine Umbrüche in wichtigen Elementen */
img, table, .card {
    page-break-inside: avoid;
}

/* === BILDER === */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Dekorative Bilder ausblenden */
.decorative-img,
.background-img {
    display: none !important;
}

/* === FUSSNOTE MIT URL === */
@page {
    margin: 2cm;

    @bottom-center {
        content: "rapidarchiv.at";
        font-size: 8pt;
    }

    @bottom-right {
        content: "Seite " counter(page);
        font-size: 8pt;
    }
}

/* === ERFOLGE/TROPHÄEN === */
.erfolge-liste {
    display: block;
    margin: 8pt 0;
}

.erfolg-item,
.erfolg-gold,
.erfolg-silber {
    background: white !important;
    border: 1px solid #666 !important;
    border-left: none !important;
    padding: 4pt 8pt !important;
    margin-bottom: 4pt;
    page-break-inside: avoid;
}

.erfolg-titel,
.erfolg-saisonen,
.erfolg-anzahl {
    color: black !important;
}

.erfolg-titel {
    font-weight: bold;
}

/* === STATISTIK-SEITEN === */
.stats-grid {
    display: block;
}

.stats-grid > * {
    margin-bottom: 10pt;
}

/* Charts nicht drucken (werden nicht korrekt gerendert) */
canvas,
.chart-container {
    display: none !important;
}

.chart-container:after {
    content: "[Diagramm - siehe Online-Version]";
    display: block;
    font-style: italic;
    color: #666 !important;
}
