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;
}

.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+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.tip-input {
    width: 45px;
    display: inline-block;
    text-align: center;
}

/* Chrome, Edge, Safari */
.tip-input::-webkit-outer-spin-button,
.tip-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.tip-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Úprava tabulky zápasů pro mobilní telefony */
@media (max-width: 576px) {

    .matches-table {
        width: 100%;
        table-layout: fixed;
        font-size: 15px;
    }

    .matches-table th,
    .matches-table td {
        padding: 6px 4px;
        vertical-align: middle;
    }

    /* Datum */
    .matches-table th:nth-child(1),
    .matches-table td:nth-child(1) {
        width: 115px;
    }

    /* Domácí */
    .matches-table th:nth-child(2),
    .matches-table td:nth-child(2) {
        width: 100px;
    }

    /* Hosté */
    .matches-table th:nth-child(3),
    .matches-table td:nth-child(3) {
        width: 100px;
    }

    /* D a H */
    .matches-table th:nth-child(4),
    .matches-table td:nth-child(4),
    .matches-table th:nth-child(5),
    .matches-table td:nth-child(5) {
        width: 45px;
    }

    /* Akce */
    .matches-table th:nth-child(6),
    .matches-table td:nth-child(6) {
        width: 75px;
    }

    /* Vstupní políčka týmů */
    .matches-table .form-control {
        width: 100%;
        min-width: 0;
        padding: 6px 4px;
        text-align: center;
    }

    /* Čísla D/H */
    .matches-table input[type="number"] {
        width: 40px;
        height: 42px;
        padding: 4px 2px;
        text-align: center;
        font-size: 18px;
    }

    /* Tlačítko Smazat */
    .matches-table .btn-danger {
        margin-left: 0 !important;
        padding: 6px 7px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* Datum a čas */
    .matches-table .btn-link {
        white-space: normal;
        text-align: center;
    }

        /* Týmová pole – dva řádky */
    .matches-table textarea.form-control {
        height: 56px;
        min-height: 56px;
        resize: none;
        padding: 5px 4px;
        text-align: center;
        line-height: 22px;
    }

    /* Smazat – na mobilu pouze malé X */
    .matches-table .match-delete {
        width: 40px;
        height: 40px;
        padding: 0;
        margin-left: 0 !important;
        font-size: 24px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .matches-table .delete-text {
        display: none;
    }

    .matches-table .delete-x {
        display: inline;
    }
/* Přehled - úprava pro mobil */

.overview-table td:nth-child(2) {
    font-size: 13px;
    line-height: 1.2;
}

/* Sloupce hráčů - jednotná šířka */
.overview-table th:nth-child(n+4),
.overview-table td:nth-child(n+4) {
    width: 65px;
    min-width: 65px;
    max-width: 65px;
    box-sizing: border-box;
}

/* Jména hráčů - dva řádky */
.overview-table thead th:nth-child(n+4) {
    font-size: 12px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.1;
    text-align: center;
} 

/* Sticky hlavička Přehledu – mobil */
.overview-sticky-header th {
    height: 58px;
    min-height: 58px;
}

.overview-header-fixed,
.overview-header-players {
    height: 58px;
}

}

/* KONEC@media */

/* Sticky hlavička Přehledu – mobil na šířku */
@media (max-width: 576px) and (orientation: landscape) {
    .overview-sticky-header th {
        height: 58px;
        min-height: 58px;
    }

    .overview-header-fixed,
    .overview-header-players {
        height: 58px;
    }
}

/* KONEC@media na sirku */

/* Sticky hlavička stránky Zápasy */
.matches-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Sticky záhlaví tabulky */
.matches-table thead {
    position: sticky;
    top: 125px;
    z-index: 999;
    background: white;
}

.matches-table thead th {
    background: white;
}

/* Přehled - horní lišta */
.overview-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding-top: 8px;
    padding-bottom: 10px;
}

.overview-toolbar {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Přehled - vodorovný posun pouze tabulky */
.overview-table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.overview-table {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.overview-table.my-tips-mode {
    min-width: 0;
    width: max-content;
}

/* =========================
   Ukotvené sloupce
   ========================= */

/* Datum */
.overview-table th:nth-child(1),
.overview-table td:nth-child(1) {
    position: sticky;
    left: 0;
    width: 65px;
    min-width: 65px;
    max-width: 65px;
    z-index: 3;
    background: white;
    box-sizing: border-box;
}

/* Zápas */
.overview-table th:nth-child(2),
.overview-table td:nth-child(2) {
    position: sticky;
    left: 65px;
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    z-index: 3;
    background: white;
    box-sizing: border-box;
    text-align: center;
}

/* Výsledek */
.overview-table th:nth-child(3),
.overview-table td:nth-child(3) {
    position: sticky;
    left: 190px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    z-index: 3;
    background: white;
    box-sizing: border-box;
}

/* Jemné oddělení ukotvené části */
.overview-table td:nth-child(3),
.overview-table th:nth-child(3) {
    box-shadow: 2px 0 3px rgba(0, 0, 0, 0.12);
}
/* Hráčské sloupce */
.overview-table th:nth-child(n+4),
.overview-table td:nth-child(n+4) {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    box-sizing: border-box;
}

/* Přehled - samostatná sticky hlavička */
.overview-sticky-header {
    position: sticky;
    top: 82px;
    z-index: 30;
    display: flex;
    width: 100%;
    background: white;
    overflow: hidden;
}

/* Pevná část hlavičky - Datum, Zápas, V */
.overview-sticky-fixed {
    flex: 0 0 230px;
    width: 230px;
    overflow: hidden;
    background: white;
    z-index: 11;
}

.overview-header-fixed {
    width: 230px;
    min-width: 230px;
    margin-bottom: 0;
    table-layout: fixed;
}

/* Stejné šířky jako v hlavní tabulce */
.overview-header-fixed th:nth-child(1) {
    width: 65px;
    min-width: 65px;
    max-width: 65px;
}

.overview-header-fixed th:nth-child(2) {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
}

.overview-header-fixed th:nth-child(3) {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

/* Posuvná část - hráči */
.overview-sticky-players {
    flex: 1 0 auto;
    min-width: 0;
    overflow: hidden;
    background: white;
}

.overview-header-players {
    width: max-content;
    margin-bottom: 0;
    table-layout: fixed;
}

.overview-header-players th {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.1;
}

.overview-header-players th {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
}

/* Výška a vzhled hlavičky */
.overview-sticky-header th {
    min-height: 58px;
    height: 58;
    padding: 6px 4px;
    vertical-align: middle;
    background: white;
    box-sizing: border-box;
}

.overview-header-fixed,
.overview-header-players {
    height: 58px;
}

/* Přehled - filtr hráčů */
.player-filter {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.player-filter-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.player-filter-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.player-filter-item input {
    width: 18px;
    height: 18px;
}

.player-filter-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* =========================
   Přehled - desktop
   ========================= */
@media (min-width: 577px) {

    /* Na PC držíme pevné šířky sloupců
       a dovolíme horizontální posun */
    .overview-table {
        width: max-content;
        min-width: 0;
    }
    /* Přehled - desktop sticky hlavička tabulky */
    .overview-sticky-header {
        top: 90px;
    }
}


/* =========================================================
   TipCell - zadávání a editace tipů
   ========================================================= */

.tip-cell {
    vertical-align: middle;
    text-align: center;
}

.tip-cell-editable {
    cursor: pointer;
    transition: background-color 0.15s ease,
                box-shadow 0.15s ease;
}

.tip-cell-editable:hover {
    background-color: rgba(13, 110, 253, 0.10);
    box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.18);
}

.tip-cell-editable:active {
    background-color: rgba(13, 110, 253, 0.20);
    box-shadow: inset 0 0 0 3px rgba(13, 110, 253, 0.28);
}

.tip-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.1s ease;
}

.tip-cell-editable:hover .tip-add {
    transform: scale(1.15);
}

.tip-cell-editable:active .tip-add {
    transform: scale(0.90);
}

.tip-editor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.tip-input {
    width: 3.2rem;
    min-width: 3.2rem;
    height: 2.3rem;
    padding: 0.2rem 0.3rem;
    text-align: center;
}

.tip-colon {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
}

.tip-action-button {
    min-width: 2.3rem;
    height: 2.3rem;
    padding: 0.2rem 0.45rem;
}

.tip-saving-spinner {
    display: inline-block;
    width: 1.35rem;
    height: 1.35rem;
    border: 3px solid rgba(13, 110, 253, 0.20);
    border-top-color: rgba(13, 110, 253, 0.90);
    border-radius: 50%;
    animation: tip-spin 0.7s linear infinite;
}

@keyframes tip-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .tip-input {
        width: 2.8rem;
        min-width: 2.8rem;
        height: 2.2rem;
    }

    .tip-action-button {
        min-width: 2.2rem;
        height: 2.2rem;
    }

    .tip-editor {
        gap: 0.15rem;
    }

    .tip-add {
        font-size: 1.9rem;
    }
}

/* Editor tipu musí být vždy nad okolními buňkami tabulky */

.tip-cell-editing {
    position: relative;
    z-index: 10000 !important;
}

.tip-cell-editing .tip-editor {
    position: relative;
    z-index: 10001;
    background: white;
    border-radius: 0.35rem;
    padding: 0.15rem;
}

/* =========================================================
   Přehled zápasů – zarovnání a čitelnost řádků
   ========================================================= */

.overview-table tbody tr > td {
    vertical-align: middle;
}

.overview-table tbody tr:nth-child(even) > td {
    background-color: rgba(0, 0, 0, 0.035);
}

.overview-table tbody tr:hover > td {
    background-color: rgba(13, 110, 253, 0.07);
}

/* Fixní sloupce – neprůhledné a vždy nad posouvanými sloupci */

.overview-table tbody tr > td:nth-child(1),
.overview-table tbody tr > td:nth-child(2),
.overview-table tbody tr > td:nth-child(3) {
    position: sticky;
    z-index: 20 !important;
}

/* Střídání řádků */

.overview-table tbody tr:nth-child(odd) > td:nth-child(1),
.overview-table tbody tr:nth-child(odd) > td:nth-child(2),
.overview-table tbody tr:nth-child(odd) > td:nth-child(3) {
    background-color: #ffffff !important;
}

.overview-table tbody tr:nth-child(even) > td:nth-child(1),
.overview-table tbody tr:nth-child(even) > td:nth-child(2),
.overview-table tbody tr:nth-child(even) > td:nth-child(3) {
    background-color: #f7f7f7 !important;
}

/* Hover */

.overview-table tbody tr:hover > td:nth-child(1),
.overview-table tbody tr:hover > td:nth-child(2),
.overview-table tbody tr:hover > td:nth-child(3) {
    background-color: #eef5ff !important;
}

/* Existující editovatelný tip – tučné skóre */
.tip-cell-editable .tip-value {
    font-weight: 700;
}

/* Přehled – flex kontejner nesmí být roztahován širokou tabulkou */

.page > main {
    min-width: 0;
    max-width: 100%;
}

.page > main > article.content {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobilní telefon na šířku */
@media (min-width: 577px) and (max-width: 900px) and (orientation: landscape) {

    .overview-sticky-header th {
        height: 70px;
        min-height: 70px;
    }

    .overview-header-fixed,
    .overview-header-players {
        height: 70px;
    }
}


/* Landscape telefon – úspornější šířky tabulky */
@media (min-width: 577px) and (max-width: 900px) and (orientation: landscape) {

    /* Celá tabulka – o něco menší */
    .overview-table {
        font-size: 14px;
    }

    .overview-table th,
    .overview-table td {
        padding: 4px 3px;
    }

    /* Zápas */
    .overview-table th:nth-child(2),
    .overview-table td:nth-child(2),
    .overview-header-fixed th:nth-child(2) {
        width: 125px;
        min-width: 125px;
        max-width: 125px;
    }

    /* V */
    .overview-table th:nth-child(3),
    .overview-table td:nth-child(3),
    .overview-header-fixed th:nth-child(3) {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
    }

    /* Hráči */
    .overview-table th:nth-child(n+4),
    .overview-table td:nth-child(n+4),
    .overview-header-players th {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
    }

    /* Jména hráčů */
    .overview-header-players th {
        font-size: 12px;
    }

        /* Horní ovládací část – landscape telefon */
    .overview-header h3 {
        font-size: 26px;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .overview-toolbar {
        gap: 6px;
    }

    .overview-toolbar .btn {
        font-size: 14px;
        padding: 5px 10px;
    }

}

/* =========================================================
   PŘEHLED – ODDĚLENÍ KOL
   ========================================================= */

.overview-table tbody tr.round-separator > td {
    height: 42px !important;
    padding: 0 !important;

    background: #2f6fb3 !important;
    color: #ffffff !important;

    border: none !important;
    box-shadow: none !important;
}

/* Zrušení střídání barev a hover efektu */
.overview-table tbody tr.round-separator:nth-child(odd) > td,
.overview-table tbody tr.round-separator:nth-child(even) > td,
.overview-table tbody tr.round-separator:hover > td {
    background: #2f6fb3 !important;
    color: #ffffff !important;
}

/* Samotný nápis kola */
.round-separator-label {
    position: sticky;
    left: 230px;

    display: inline-block;

    font-size: 22px;
    font-weight: 900;
    color: #ffffff !important;

    white-space: nowrap;

    z-index: 50;
}

/* =========================================================
   Přehled – úsporná horní lišta na mobilu na šířku
   ========================================================= */

@media (max-width: 1000px) and (max-height: 600px) and (orientation: landscape) {

    .overview-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .overview-header h3 {
        font-size: 24px;
        margin: 0;
        white-space: nowrap;
    }

    .overview-toolbar {
        display: flex;
        gap: 5px;
        flex-wrap: nowrap;
    }

    .overview-toolbar .btn {
        font-size: 13px;
        padding: 5px 8px;
        white-space: nowrap;
    }

    .overview-sticky-header {
        top: 49px;
    }
}
