/* ====== Základní stylování ====== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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;
}

.scrollable-content {
    overflow-y: auto;
}


.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(...) 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;
}

.footer-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-toggler {
    border-bottom: 1px solid #333;
    background-color: transparent;
}

.nav-link .bi {
    height: auto !important;
    top: 0 !important;
    margin-right: 0.5rem;
    vertical-align: middle;
    font-size: 1.1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

    .nav-link:hover {
        background-color: var(--color-sidebar-hover);
        color: var(--color-text-on-dark); /* bílý text na tmavém pozadí */
        border-radius: 0.375rem;
        transition: background-color 0.2s ease;
    }

.form-switch .form-check-input:checked {
    background-color: black !important;
    border-color: black !important;
}

.form-switch .form-check-input {
    background-color: black !important;
    border-color: black !important;
}

.custom-navbar-container {
    padding-top: 50px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.customNavBar {
    padding-top: 50px !important;
    margin-top: 0 !important;
    border: 0px;
    padding-left: 10px;
    width: 230px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.customNavMain {
    background-color: var(--color-sidebar);
    width: 100%;
    left: -32px;
    border: 0px;
    margin: 0px;
    padding-top: 0px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}


/* Kruhový avatar hráče */
.player-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

    .player-avatar:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

/* Výchozí ikona pro hráče bez fotky */
.default-player-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    border: 3px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

    .default-player-icon i {
        opacity: 0.9;
    }

/* Menší verze pro seznamy */
.player-avatar-sm {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.default-player-icon-sm {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    border: 2px solid #dee2e6;
}

/* Střední verze */
.player-avatar-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dee2e6;
}

.default-player-icon-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    border: 3px solid #dee2e6;
}



/* Checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid gray;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    background-color: white;
}

    .custom-checkbox:checked {
        background-color: black;
    }

        .custom-checkbox:checked::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 6px;
            width: 5px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

/* Tlačítka */
.btn-save {
    background-color: var(--color-button-save);
    color: var(--color-text-button-save);
    border: 1px solid var(--color-border-button-save);
}

    .btn-save:hover {
        background-color: var(--color-button-save-hover);
    }

/* Tlačítko: Zpět */
.btn-back {
    background-color: var(--color-button-back);
    color: var(--color-text-button-back);
    border: 1px solid var(--color-border-button-back);
}

    .btn-back:hover {
        background-color: var(--color-button-back-hover);
    }

/* Tlačítko: Detail */
.btn-detail {
    background-color: var(--color-button-save);
    color: var(--color-text-button-save);
    border: 1px solid var(--color-border-button-save);
}

    .btn-detail:hover {
        background-color: var(--color-button-save-hover);
    }

.btn-delete {
    background-color: var(--color-button-delete);
    color: var(--color-text-button-save);
    border: 1px solid var(--color-border-button-save);
}

    .btn-delete:hover {
        background-color: var(--color-button-delete-hover);
    }

/* Tlačítko: Ostatní / Sekundární */
.btn-other {
    background-color: var(--color-button-secondary);
    color: var(--color-text-button-secondary);
    border: 1px solid var(--color-border-button-secondary);
}

    .btn-other:hover {
        background-color: var(--color-button-secondary-hover);
    }

/* Tlačítko: Oko pro zobrazení hesla */
.btn-outline-password-toggle {
    background-color: var(--color-button-secondary);
    color: var(--color-text-button-secondary);
    border: 1px solid var(--color-border-password-toggle);
}

    .btn-outline-password-toggle:hover {
        background-color: var(--color-button-secondary-hover);
    }
.logout-button {
    background-color: var(--color-button-logout);
    color: var(--color-text-button-logout);
    border: none;
    transition: background-color 0.2s ease-in-out;
}

    .logout-button:hover {
        background-color: var(--color-button-logout-hover);
        color: var(--color-text-button-logout);
    }

    /*označení číslovani*/
.text-participation-yes {
    color: var(--color-text-participation-yes);
}

.text-participation-no {
    color: var(--color-text-participation-no);
}

.text-participation-maybe {
    color: var(--color-text-participation-maybe);
}

/*rádky v tabulce*/
.table-select-yes td {
    background-color: var(--color-bg-select-yes) !important;
    color: var(--color-text-select-yes) !important;
}

.table-select-no td {
    background-color: var(--color-bg-select-no) !important;
    color: var(--color-text-select-no) !important;
}

.table-select-maybe td {
    background-color: var(--color-bg-select-maybe) !important;
    color: var(--color-text-select-maybe) !important;
}

/*podbarvni hracu v tymu*/
.row-yellow td {
    background-color: var(--color-team-yellow) !important;
    color: var(--color-text-team-yellow);
}

.row-blue td {
    background-color: var(--color-team-blue) !important;
    color: var(--color-text-team-blue);
}

/*combo box barvy*/
.select-custom {
    appearance: none; /* odstraní výchozí vzhled (např. modrý trojúhelník) */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    color: var(--color-text-button-secondary);
    border: 1px solid var(--color-border-button-secondary);
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23554400' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    padding-right: 2rem; /* místo na šipku */
}

    .select-custom:focus {
        outline: none;
        border-color: var(--color-button-secondary-hover);
        box-shadow: 0 0 0 0.15rem rgba(212, 191, 106, 0.4); /* jemný zlatavý efekt */
    }

    /* Aby byly options bílé */
    .select-custom option {
        background-color: #ffffff;
        color: var(--color-text-on-light);
    }

.card-bg-yellow-win {
    background-color: var(--color-team-yellow);
    color: var(--color-text-team-yellow, #212529); /* Použije --color-text-team-yellow, ak existuje, inak tmavú farbu */
}

.card-bg-blue-win {
    background-color: var(--color-team-blue);
    color: var(--color-text-team-blue, #f8f9fa);
}

.card-bg-draw {
    background-color: var(--color-neutral-secondary, #6c757d);
    color: var(--color-text-light, #f8f9fa);
}
.team-color-circle {
    /* Premenná s predvolenou veľkosťou */
    --circle-size: 1em;
    display: inline-block;
    width: var(--circle-size); /* Použitie premennej */
    height: var(--circle-size); /* Použitie premennej */
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.2em;
    margin-left: 0.2em;
}

.team-yellow {
    background-color: var(--color-icon-yellow);
}

.team-blue {
    background-color: var(--color-icon-blue);
}

.circle-sm {
    --circle-size: 0.8em; /* Malý krúžok */
}

.circle-md {
    --circle-size: 1em; /* Stredný krúžok (predvolený) */
}

.circle-lg {
    --circle-size: 1.5em; /* Veľký krúžok */
}


/* PC */
@media (min-width: 769px) {
    .mainContent {
        margin-top: 60px;
        padding-top: 60px;
        margin-left: 230px;
        height: 100vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .sidebarCustom {
        position: fixed;
        top: 0;
        left: 0;
        width: 230px;
        background-color: var(--color-sidebar);
        display: flex;
        flex-direction: column;
        margin: 0;
        padding-top: 10px;
        border: 0;
        height: 100%;
        border-right: 2px solid #333;
        border-bottom: 2px solid #333;
    }

    .login-status-wrapper {
        width: 100%;
        height: 60px;
        padding-left: 240px;
        padding-right: 50px;
        background-color: var(--color-top-panel);
        border-bottom: 1px solid #333;
        z-index: 2000;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-header {
        text-align: center;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        margin-top: 50px;
        padding-top: 0px;
        position: fixed;
        height: 60px;
        top: 10px;
        left: 230px;
        background-color: white;
        z-index: 10;
        width: calc(100% - 230px);
        border-bottom: 2px solid #ccc;
    }
}

/* Mobil */
/* ====== MOBIL ====== */
@media (max-width: 768px) {
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 1)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }

    .page-header {
        text-align: center;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        margin-top: 50px;
        padding-top: 0px;
        position: fixed;
        height: 45px;
        top: 10px;
        left: 0;
        background-color: white;
        z-index: 10;
        width: 100%;
        border-bottom: 2px solid #ccc;
    }

    /* Menu základní stav - skryté */
    .customNavBar {
        padding-top: 50px !important;
        padding-left: 10px;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

        /* Menu otevřené - s třídou 'show' */
        .customNavBar.show {
            z-index: 2000;
            padding-top: 50px !important;
            margin-top: 0 !important;
            padding-left: 10px;
            width: 280px;
            max-height: 100vh;
            opacity: 1;
            background-color: var(--color-sidebar);
            border-right: 2px solid #333;
            border-bottom: 2px solid #333;
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            overflow-y: auto;
            overflow-x: hidden;
        }

    /* Overlay pro zavření menu */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: block;
    }

    .customButton {
        border: 2px solid #333;
        top: 5px;
        border-radius: 6px;
        position: fixed;
        left: 10px;
        z-index: 2050;
        height: 50px;
        width: 50px;
        background-color: dimgray !important;
    }

    .sidebarCustom {
        position: fixed;
        left: 0;
        top: 0;
        margin: 0px;
        padding-top: 0px;
        border: 0px;
        width: auto;
        height: 100vh;
        z-index: 1998;
    }

    .customNavMain {
        background-color: transparent;
        width: auto;
        border: 0px;
        margin: 0px;
        padding: 0px;
        height: 100%;
    }

    .mainContent {
        left: 0px;
        padding-top: 90px;
        margin-left: 0px;
        width: 100%;
        overflow-x: auto;
    }

    form {
        max-width: 1000px;
        margin: 0 auto;
    }

    .login-status-wrapper {
        width: 100%;
        height: 60px;
        padding-left: 80px;
        padding-right: 10px;
        background-color: var(--color-top-panel);
        z-index: 2000;
        position: fixed;
        top: 0px;
        left: 0px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-bottom: 1px solid #333;
    }
}

/* ====== PC ====== */
@media (min-width: 769px) {
    .customButton {
        display: none !important;
    }

    .menu-overlay {
        display: none !important;
    }

    .customNavBar {
        display: flex !important;
        opacity: 1 !important;
        max-height: none !important;
        padding-top: 50px !important;
        margin-top: 0 !important;
        border: 0px;
        padding-left: 10px;
        width: 230px;
    }

    .customNavMain {
        background-color: var(--color-sidebar);
        width: 100%;
        left: -32px;
        border: 0px;
        margin: 0px;
        padding-top: 0px;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .mainContent {
        margin-top: 60px;
        padding-top: 60px;
        margin-left: 230px;
        height: 100vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .sidebarCustom {
        position: fixed;
        top: 0;
        left: 0;
        width: 230px;
        background-color: var(--color-sidebar);
        display: flex;
        flex-direction: column;
        margin: 0;
        padding-top: 10px;
        border: 0;
        height: 100%;
        border-right: 2px solid #333;
        border-bottom: 2px solid #333;
    }

    .login-status-wrapper {
        width: 100%;
        height: 60px;
        padding-left: 240px;
        padding-right: 50px;
        background-color: var(--color-top-panel);
        border-bottom: 1px solid #333;
        z-index: 2000;
        position: fixed;
        top: 0;
        left: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-header {
        text-align: center;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        margin-top: 50px;
        padding-top: 0px;
        position: fixed;
        height: 60px;
        top: 10px;
        left: 230px;
        background-color: white;
        z-index: 10;
        width: calc(100% - 230px);
        border-bottom: 2px solid #ccc;
    }
}

