/* --- Styling for Fodbold Kampliste --- */
.fdh-match-list {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 3px;
	margin: 10px 0 20px 0;
}

.fdh-match-row {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 8px 15px; /* ÆNDRING: Mindre top/bund padding */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.fdh-match-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.fdh-match-date {
    flex: 0 0 20%; /* Optager 20% af bredden */
    display: flex;
    flex-direction: row; 
    align-items: center;
    justify-content: flex-end; 
    text-align: right; 
    border-right: 1px solid #ecf0f1;
    padding-right: 15px;
    margin-right: 15px;
}

.fdh-match-date span:first-child {
    font-weight: 700;
    font-size: 14px;
    color: #2c3e50;
}

.fdh-match-date span + span::before {
    content: "-";
    margin: 0 6px; /* Tilføjer luft på begge sider af bindestregen */
    color: #7f8c8d; /* Giver bindestregen samme farve som klokkeslættet */
}

.fdh-match-date span:last-child {
    font-size: 12px;
    color: #7f8c8d;
}

.fdh-match-teams {
    flex: 1 1 55%; /* Optager 55% af bredden og kan vokse/krympe */
    display: flex;
    align-items: center;
    justify-content: center;
}

.fdh-match-teams .team-home,
.fdh-match-teams .team-away {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    flex-basis: 40%;
}

.fdh-match-teams .team-home {
    justify-content: flex-end;
}

.fdh-match-teams .team-away {
    justify-content: flex-start;
}

/* Ultra-specifik regel for at tvinge den korrekte logo-størrelse */
.fdh-match-list .fdh-match-row .fdh-match-teams img {
    width: 32px !important;   /* ÆNDRING: Mindre logoer */
    height: 32px !important;  /* ÆNDRING: Mindre logoer */
    min-width: 32px !important;
    max-width: 32px !important; 
    margin: 0 8px !important; /* ÆNDRING: Mindre margin */
}

.fdh-match-teams .match-score {
    font-size: 17px;
    font-weight: 700;
    color: #2c3e50;
    padding: 0 15px; 
    min-width: auto;
    text-align: center;
}

.fdh-match-competition {
    flex: 0 0 25%; /* Optager 25% af bredden */
    text-align: right;
    font-size: 12px;
    color: #95a5a6;
    padding-left: 15px; /* Tilføjet for lidt luft */
}

/* ============================================= */
/* == RESPONSIVT DESIGN - MERE KOMPAKT MOBIL  == */
/* ============================================= */
@media (max-width: 768px) {

    .fdh-match-row,
	.fdh-single-match-wrapper {
        /* ÆNDRING: Mindre padding i top/bund af hver kamp-række */
        padding: 8px 10px;
        
        /* ÆNDRING: Mindre afstand mellem dato, hold og turnering */
        gap: 6px;

        /* Standard-regler for mobil-layout */
        flex-direction: column;
        align-items: center;
    }

    /* Generel nulstilling for de tre indre blokke */
    .fdh-match-date,
    .fdh-match-teams,
    .fdh-match-competition {
        margin: 0; /* Nulstil margin for at lade 'gap' styre alt */
        padding: 0;
        border: none;
        width: 100%;
        text-align: center;
    }

    /* Sikrer den korrekte rækkefølge */
    .fdh-match-date { 
        order: 1; 
        font-weight: bold;
		display: flex;
		justify-content: center;
    }
    .fdh-match-teams { 
        order: 2;
        display: flex; /* Sørger for at holdene er på én linje */
        justify-content: center;
        align-items: center;
    }
    .fdh-match-competition { 
        order: 3; 
        font-size: 0.8em;
        color: #7f8c8d;
    }

    /* Reducer pladsen omkring "VS" yderligere */
    .fdh-match-teams .match-score {
        padding: 0 8px;
    }

    /* --- KORREKTE REGLER FOR STILLINGSTABEL PÅ MOBIL --- */
    
    /* Skjuler kun de kolonner, vi er enige om */
    .fdh-hide-mobile { 
        display: none !important; 
    }

    /* Gør padding i cellerne en smule mindre */
    .fdh-standings-container th, .fdh-standings-container td { 
        padding: 10px 6px; 
    }
    
    .fdh-standings-container .fdh-team-cell { 
        text-align: left; 
    }

    /* KUN reglen for at justere skriftstørrelsen */
    .fdh-standings-container th,
    .fdh-standings-container td {
        font-size: 12px !important;
    }
    
    /* Reglerne der gør form-ikonerne mindre (valgfrit, men hjælper på pladsen) */
    .fdh-form-indicators {
        gap: 3px;
    }
    .fdh-form-icon {
        width: 11px;
        height: 11px;
    }
}

/* Sikrer at lange hjemmeholdsnavne forbliver højrejusteret (uændret) */
.fdh-match-teams .team-home .team-name {
    text-align: right;
}

/* --- H2H Specifikke stilarter --- */
.fdh-h2h-latest-heading {
    margin-top: 20px;
}

/* --- Styling for Stillingstabel --- */
.fdh-standings-container { max-width: 900px; margin: 20px auto; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); overflow: hidden; }
.fdh-tabs { padding: 10px 20px 0 20px; border-bottom: 1px solid #eef0f3; display: flex; gap: 10px; }
.fdh-tab-button { padding: 15px 20px; cursor: pointer; border: none; background-color: transparent; font-size: 16px; color: #666; border-bottom: 3px solid transparent; }
.fdh-tab-button.active { color: #0d6efd; border-bottom-color: #0d6efd; }
.fdh-table-wrapper { overflow-x: auto; }
.fdh-standings-container table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fdh-standings-container th, .fdh-standings-container td { padding: 12px 15px; text-align: center; }
.fdh-standings-container th { background-color: #f9fafb; font-weight: 600; color: #555; text-transform: uppercase; font-size: 12px; }
.fdh-standings-container .fdh-team-header { text-align: left; }
.fdh-standings-container .fdh-team-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.fdh-team-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.fdh-team-logo { width: 24px; height: 24px; }
.fdh-standings-container tr:nth-child(even) { background-color: #f9fafb; }
.fdh-standings-container tr:hover { background-color: #eef0f3; }
.fdh-standings-container td:last-child { font-weight: 700; }

/* --- OPDATERET OG FORBEDRET FARVESYSTEM FOR STILLINGER --- */

/* Først defineres den generelle stil for den lille farveboks i tegnforklaringen */
.fdh-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    /* Selve farven sættes af klasserne nedenfor */
}

/* Nu definerer vi farverne for hver status.
  Reglerne er delt op: Én for selve rækken (tr) og én for boksen i tegnforklaringen.
*/

/* Oprykning & Mesterskabsslutspil */
tr.fdh-pos-promotion-direct { border-left: 5px solid #1e7e34; }
.fdh-legend-color.fdh-pos-promotion-direct { background-color: #1e7e34; }

tr.fdh-pos-promotion-playoff { border-left: 5px solid #28a745; }
.fdh-legend-color.fdh-pos-promotion-playoff { background-color: #28a745; }

/* Champions League */
tr.fdh-pos-group-stage-cl { border-left: 5px solid #1e7e34; }
.fdh-legend-color.fdh-pos-group-stage-cl { background-color: #1e7e34; }

tr.fdh-pos-qualification-cl { border-left: 5px solid #28a745; }
.fdh-legend-color.fdh-pos-qualification-cl { background-color: #28a745; }

/* Europa League */
tr.fdh-pos-group-stage-el { border-left: 5px solid #ff7b00; }
.fdh-legend-color.fdh-pos-group-stage-el { background-color: #ff7b00; }

tr.fdh-pos-qualification-el { border-left: 5px solid #ffac65; }
.fdh-legend-color.fdh-pos-qualification-el { background-color: #ffac65; }

/* Conference League */
tr.fdh-pos-group-stage-ecl { border-left: 5px solid #17a2b8; }
.fdh-legend-color.fdh-pos-group-stage-ecl { background-color: #17a2b8; }

tr.fdh-pos-qualification-ecl { border-left: 5px solid #6cc7d5; }
.fdh-legend-color.fdh-pos-qualification-ecl { background-color: #6cc7d5; }

/* Nedrykning & Nedrykningsslutspil */
tr.fdh-pos-relegation-direct { border-left: 5px solid #dc3545; }
.fdh-legend-color.fdh-pos-relegation-direct { background-color: #dc3545; }

tr.fdh-pos-relegation-playoff { border-left: 5px solid #e87c87; }
.fdh-legend-color.fdh-pos-relegation-playoff { background-color: #e87c87; }

.fdh-form-indicators { display: flex; gap: 4px; justify-content: center; }
.fdh-form-icon { width: 14px; height: 14px; border-radius: 50%; display: inline-block; cursor: help; }
.fdh-form-W { background-color: #28a745; }
.fdh-form-D { background-color: #ffc107; }
.fdh-form-L { background-color: #dc3545; }
.fdh-last-updated { padding: 15px 20px; font-size: 12px; color: #888; text-align: right; border-top: 1px solid #eef0f3; }
.fdh-standings-legend { padding: 20px; background-color: #f9fafb; border-top: 1px solid #eef0f3; display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; }
.fdh-legend-item { display: flex; align-items: center; gap: 8px; }

/* ========================================================== */
/* ==   STYLING FOR DEN ENKELTE NÆSTE KAMP (INGEN BOKS)    == */
/* ========================================================== */

.fdh-single-match-wrapper {
    display: flex;
    align-items: center;
    background-color: transparent; /* Ingen baggrundsfarve */
    box-shadow: none;             /* Ingen skygge */
    padding: 10px 0;              /* Lidt luft over og under */
    border-radius: 0;             /* Ingen runde hjørner */
    width: 100%;
}

/* Vi genbruger de samme procenter for kolonnerne for at sikre konsistens */
.fdh-single-match-wrapper .fdh-match-date {
    flex-basis: 20%;
}
.fdh-single-match-wrapper .fdh-match-teams {
    flex-basis: 55%;
}
.fdh-single-match-wrapper .fdh-match-competition {
    flex-basis: 25%;
}