/* Badminton Ergebnisse - Frontend Styles */
/* Font + Header-Farbe vom WordPress-Theme, Rest eigenes Styling */

/* Wrapper */
.bdm-wrapper {
    max-width: 100%;
    margin: 1.5em 0;
}

.bdm-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabelle Basis */
.bdm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    border: 1px solid #ddd;
}

.bdm-table thead th {
    padding: 0.6em 0.8em;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 2px solid #ccc;
}

.bdm-table tbody td {
    padding: 0.5em 0.8em;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

/* Zebrastreifen */
.bdm-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.03);
}

/* Hover */
.bdm-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* === Ergebnis-Hervorhebungen === */

/* Heimspiele: goldener Rand links */
.bdm-table tbody tr.bdm-home-game {
    border-left: 4px solid #FFD700;
}

.bdm-table tbody tr.bdm-away-game {
    border-left: 4px solid transparent;
}

/* Datum */
.bdm-table .bdm-date {
    white-space: nowrap;
    color: #555;
    font-size: 0.85em;
}

/* Teams */
.bdm-table .bdm-team {
    font-weight: 500;
}

/* Doppelpunkt-Trenner */
.bdm-table .bdm-vs {
    text-align: center;
    color: #999;
    padding: 0 0.3em;
    font-weight: 700;
}

/* Ergebnis fett + farbig */
.bdm-table .bdm-result {
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    min-width: 3em;
}

.bdm-table .bdm-win {
    background: #d4edda;
    color: #155724;
}

.bdm-table .bdm-loss {
    background: #f8d7da;
    color: #721c24;
}

.bdm-table .bdm-draw {
    background: #fff3cd;
    color: #856404;
}

.bdm-table .bdm-pending {
    background: #e2e3e5;
    color: #6c757d;
}

/* Spielort */
.bdm-table .bdm-venue {
    font-size: 0.8em;
    color: #777;
    max-width: 250px;
}

/* === Standings-Tabelle === */

.bdm-standings-table .bdm-rank {
    text-align: center;
    font-weight: 700;
    width: 2em;
}

.bdm-standings-table .bdm-team-name {
    font-weight: 500;
}

.bdm-standings-table .bdm-points {
    font-weight: 700;
    white-space: nowrap;
}

.bdm-standings-table thead th {
    text-align: center;
}

.bdm-standings-table thead th:nth-child(2) {
    text-align: left;
}

.bdm-standings-table tbody td {
    text-align: center;
}

.bdm-standings-table tbody td:nth-child(2) {
    text-align: left;
}

/* Eigenes Team hervorheben */
.bdm-standings-table tbody tr.bdm-selected {
    font-weight: 700;
}

.bdm-standings-table tbody tr.bdm-selected td {
    font-weight: 700;
}

/* Aufstiegsplaetze */
.bdm-standings-table tbody tr.bdm-promote {
    background: #edf7ed !important;
}

.bdm-standings-table tbody tr.bdm-promote:hover {
    background: #d8f0d8 !important;
}

.bdm-standings-table tbody tr.bdm-promote .bdm-rank {
    color: #28a745;
}

/* Abstiegsplaetze */
.bdm-standings-table tbody tr.bdm-demote {
    background: #fdf0f0 !important;
}

.bdm-standings-table tbody tr.bdm-demote:hover {
    background: #f8e0e0 !important;
}

.bdm-standings-table tbody tr.bdm-demote .bdm-rank {
    color: #dc3545;
}

/* === Sonstiges === */

/* Quelle */
.bdm-source {
    text-align: right;
    font-size: 0.75em;
    color: #999;
    margin: 0.5em 0 0;
}

.bdm-source a {
    color: inherit;
    text-decoration: none;
}

.bdm-source a:hover {
    text-decoration: underline;
}

/* Abstand zwischen Tabelle und Ergebnisse */
.bdm-wrapper + .bdm-wrapper {
    margin-top: 2em;
}

/* Fehler/Info */
.bdm-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1em;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.bdm-info {
    background: #e2e3e5;
    color: #6c757d;
    padding: 1em;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .bdm-hide-mobile {
        display: none;
    }

    .bdm-table {
        font-size: 0.8em;
    }

    .bdm-table thead th,
    .bdm-table tbody td {
        padding: 0.4em 0.5em;
    }
}

@media (max-width: 480px) {
    .bdm-table .bdm-date {
        font-size: 0.75em;
    }

    .bdm-table .bdm-team {
        font-size: 0.85em;
    }
}
