/* DIE ULTIMATIVE FILMENT-RETTUNG: HINTERGRUND AM GEHÄUSEBODEN VERANKERN */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    /* Zwingt das Fenster zur absoluten Voll-Höhe auf deinem Laptop */
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    /* HIER DIE ABSOLUTE RETTUNG: */
    /* Wir klatschen dein edles, tiefdunkles Farbthema direkt auf die nackte Browser-Haut! */
    background-color: #0f172a !important; /* Das tiefe Weltraum-Anthrazit, das du nutzt */
    background: #0f172a !important;
    /* Verhindert, dass das Fenster am Boden jemals anfängt zu wackeln oder zu springen */
    overflow: hidden !important;
}

/* Falls MudBlazor das innere Root-Element noch künstlich beschneidet */
#app, .mud-layout {
    background-color: transparent !important;
    background: transparent !important;
    min-height: 100vh !important;
    height: 100vh !important;
}


a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF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gODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Definiert die feste Größe des Flaggen-Kastens */
.player-grid-flag-box {
    display: inline-block !important;
    width: 26px !important;
    height: 16px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    overflow: hidden !important;
    vertical-align: middle;
}

    /* Zwingt das injizierte SVG-Element in diese Maße */
    .player-grid-flag-box svg {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        display: block !important;
    }

.custom-svg-container svg,
.selected-adornment-flag svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Bereitet den Container für die absolute Positionierung vor */
.autocomplete-with-flag {
    position: relative;
    width: 100%;
}

/* Platziert die Flagge exakt links innerhalb des Variant.Outlined Eingabefeldes */
.selected-adornment-flag {
    position: absolute;
    left: 14px;
    top: 20px; /* Zentriert die Flagge vertikal im Outlined-Feld */
    width: 26px;
    height: 16px;
    z-index: 10;
    pointer-events: none; /* Klicks gehen durch das SVG hindurch auf das Eingabefeld */
}

/* Schiebt den Text im Eingabefeld nach rechts, damit er die Flagge nicht überlappt */
.autocomplete-with-flag .has-selected-flag input {
    padding-left: 48px !important;
}

/* Verschiebt das Label (die Überschrift) nach rechts, wenn das Feld fokussiert oder befüllt ist */
.autocomplete-with-flag .has-selected-flag .mud-input-label-outlined {
    transform: translate(14px, 20px) scale(1);
}

.autocomplete-with-flag .has-selected-flag .mud-input-label-inputcontrol.mud-input-label-animated {
    /* Wenn das Label nach oben wandert, schieben wir es ein Stück mit, damit es optisch passt */
    transform: translate(14px, -6px) scale(0.75) !important;
}

/* Aber hier alle für die Dialoge */
/* 1. DAS DIALOG-MAIN-PANEL (Unser gewohnter Milchglas-Look) */
.mud-dialog.custom-dialog-panel {
    background-color: rgba(30, 41, 59, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 2px solid #334155 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7) !important;
    color: #F8FAFC !important;
    min-width: 450px; /* Gibt dem Dialog eine stabile Mindestbreite */
}

/* Den standardmäßigen weißen Header-Hintergrund von MudBlazor entfernen */
.custom-dialog-panel .mud-dialog-title {
    background: rgba(15, 23, 42, 0.3) !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5) !important;
    color: #F8FAFC !important;
    padding: 16px 24px !important;
}

/* 2. INNERE FORMULAR-STRUKTUR */
.dialog-form-container {
    padding: 10px 10px 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-bonus-row {
    display: flex;
    align-items: flex-end; /* Richtet beide Elemente unten an der Basislinie aus */
    justify-content: space-between;
    gap: 30px;
    padding-top: 15px; /* Drückt die Zeile sanft vom Sex-Switch nach unten */
    padding-bottom: 10px; /* Schafft Platz zum darunterliegenden Geburtstag */
}

/* Gibt dem Bonusfeld eine feste Breite und fängt die Label-Verschiebung auf */
.compact-bonus {
    max-width: 150px;
    width: 100%;
}


/* 3. INPUT FIELD STYLING (Helle Texte, feine Linien) */
.custom-dialog-panel .custom-input-field .mud-input {
    color: #F8FAFC !important;
}

.custom-dialog-panel .custom-input-field .mud-input-slot {
    color: #F8FAFC !important;
}

.custom-dialog-panel .custom-input-field .mud-input-label {
    color: #94A3B8 !important;
}

.custom-dialog-panel .custom-input-field .mud-input-underline:before {
    border-bottom: 1px solid rgba(148, 163, 184, 0.3) !important;
}

.custom-dialog-panel .custom-input-field .mud-icon-root {
    color: #94A3B8 !important;
}

/* Checkbox- und Switch-Texte auf hell setzen */
.custom-dialog-panel .custom-checkbox {
    color: #E2E8F0 !important;
    margin-bottom: 4px; /* Schiebt die Checkbox auf eine perfekte Linie mit der Bonus-Zahl */
}
.custom-dialog-panel .custom-sex-switch {
    color: #E2E8F0 !important;
}

.custom-label-text {
    color: #94A3B8 !important;
    font-size: 12px;
    margin-bottom: -4px;
}

/* 4. AUTOCOMPLETE SPEZIAL-TUNING */
.custom-dialog-panel .custom-autocomplete .mud-input-outlined {
    background-color: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
}

.custom-dialog-panel .custom-autocomplete .mud-input-label-outlined {
    color: #94A3B8 !important;
}

/* Das Dropdown-Menü (Pop-over) abdunkeln */
.mud-popover-provider .mud-paper {
    background-color: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(8px);
    border: 1px solid #334155 !important;
    color: #F8FAFC !important;
}

.dark-dropdown-item {
    color: #E2E8F0 !important;
}

/* 5. BUTTON-STRUKTUR GANZ UNTEN */
.dialog-actions-container {
    display: flex;
    gap: 12px;
    padding: 16px 24px !important;
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid rgba(51, 65, 85, 0.3) !important;
}

/* Speichern (Salbei-Grün) */
.custom-dialog-panel .custom-dialog-save-btn {
    background-color: #2e7d32 !important;
    color: #F8FAFC !important;
    font-weight: bold !important;
    border-radius: 6px !important;
}
/* Hinzufügen & Neu (Dezentes Slate-Blau) */
.custom-dialog-panel .custom-dialog-continue-btn {
    background-color: #334155 !important;
    color: #E2E8F0 !important;
    font-weight: bold !important;
    border-radius: 6px !important;
}
/* Abbrechen (Schiefer-Grau) */
.custom-dialog-panel .custom-dialog-cancel-btn {
    background-color: #475569 !important;
    color: #F8FAFC !important;
    border-radius: 6px !important;
}
/* Verpasst dem aktivierten Damen-Switch ein wunderschönes, dezentes Rosa */
.custom-dialog-panel .mud-switch-button.mud-secondary-text {
    color: #F472B6 !important; /* Der Knubbel des Switches */
}

.custom-dialog-panel .mud-switch-track.mud-secondary {
    background-color: rgba(244, 114, 182, 0.5) !important; /* Die Schiene dahinter */
}
/* Zwingt den geschriebenen Text und die Platzhalter im Prize-Dialog auf klares Weiß */
.custom-dialog-panel .custom-input-field .mud-input-slot {
    color: #F8FAFC !important;
}

/* Macht die kleinen Hoch-/Runter-Pfeile der Zahlenfelder wieder hell und sichtbar */
.custom-dialog-panel .custom-input-field .mud-icon-root {
    color: #94A3B8 !important;
}

/* Verleiht auch dem Ausklapp-Text für das PrizeKind (Overall) die helle Föderations-Farbe */
.custom-dialog-panel .custom-select-field .mud-select-input {
    color: #F8FAFC !important;
}

/* Richtet die Klon-Optionen vertikal aus */
.checkbox-column-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 4px;
}


/* Zwingt das MudBlazor-Layout und den Inhalts-Container zur VOLLEN Höhe */

/* Verankert den schwebenden Bezugspunkt auf allen deinen 8 Seiten */
.playtournament-page-wrapper,
.tournament-overview-page-wrapper, /* Füge hier die Haupt-Klassen deiner Seiten hinzu */
.PayoutPresenter {
    position: relative !important; /* DIE RETTUNG: Erlaubt dem Icon das rechts-oben Einrasten! */
}

/* Positioniert das Gehäuse unerbittlich haarscharf in der echten Ecke */
.floating-home-zone {
    position: absolute !important;
    top: 14px !important; /* Haargenau auf der Achse der oberen Zeile */
    right: 24px !important; /* Klebt perfekt flach an der rechten Kante */
    z-index: 9999 !important; /* Thront über allen Tabellen und Rändern */
    display: block !important;
}

/* Das nackte HTML-Tag zu einer winzigen, ultraflachen Linse pressen */
a.custom-floating-home-btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 28px !important; /* Winzige, unaufdringliche Präsenz */
    height: 28px !important;
    background-color: rgba(30, 41, 59, 0.4) !important;
    background: rgba(30, 41, 59, 0.4) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

    /* Das SVG-Icon im Zentrum messerscharf einmessen */
    a.custom-floating-home-btn svg {
        fill: #94A3B8 !important;
        width: 14px !important; /* Elegant, dezent und absolut minimalistisch */
        height: 14px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Der leuchtende Impuls beim Hovern */
    a.custom-floating-home-btn:hover {
        border-color: #38bdf8 !important;
        transform: scale(1.05) !important;
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.45) !important;
    }

        a.custom-floating-home-btn:hover svg {
            fill: #38bdf8 !important;
        }
