html {
    font-size: 14px;
}

@media (min-width:768px) {
    html {
        font-size: 16px;
    }
}

html, body {
    min-height: 100%;
}

.pagination-container {
    text-align: center;
}

.pagination .page-item .page-link {
    margin: 0 2px;
}

.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 #C7833F;
}

body.busy-cursor {
    cursor: progress !important;
    z-index: 20000000;
}

#results[aria-busy="true"] {
    cursor: progress;
}

.help-icon {
    cursor: help;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    line-height: 1;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 50%;
    padding: 2px 7px 3px 7px;
    margin-left: .375rem;
    user-select: none;
}

    .help-icon:hover {
        opacity: .85;
    }

/* Dni tygodnia w siatce */
.day-cell {
    transition: background-color .15s ease;
}

    .day-cell[data-dow="6"] {
        background-color: rgba(0,0,0,.04);
    }
    /* sobota */
    .day-cell[data-dow="0"] {
        background-color: rgba(255,0,0,.06);
        color: #b30000;
        font-weight: 600;
    }
    /* niedziela */

    /* Kropki (PL / World) */
    .day-cell[data-has-pl="true"]::after,
    .day-cell[data-has-world="true"]::before {
        content: "";
        position: absolute;
        top: 6px;
        right: 6px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
    }

    .day-cell[data-has-pl="true"]::after {
        background: #C7833F;
    }
    /* złoto/brąz */
    .day-cell[data-has-world="true"]::before {
        background: #2E6FDE;
        right: 14px;
    }
/* niebieski */

/* Delikatna pastylka nad kalendarzem */
.calendar-hint {
    font-size: .9375rem;
    opacity: .9;
    color: #333 !important;
    background-color: rgba(255,255,255,.85);
    padding: .4rem .6rem;
    border-radius: 6px;
}

/* main zawsze do dołu okna */
main {
    min-height: calc(100dvh - 60px);
    display: flex;
    flex-direction: column;
}

/* --- Sponsors bar --- */
.sponsors {
    margin-block: 2rem 1rem;
}

.sponsors-shell {
    position: relative;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(0,0,0,.20);
    backdrop-filter: blur(8px) saturate(90%);
    -webkit-backdrop-filter: blur(8px) saturate(90%);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.s-title {
    margin: 0 0 .75rem 0;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.s-logos {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.s-logo {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: contain;
    object-position: center;
    filter: grayscale(.05) saturate(1);
    transition: transform .2s ease, filter .2s ease;
}

    .s-logo:hover {
        transform: translateY(-2px);
        filter: none;
    }

.s-logo--blend {
    mix-blend-mode: multiply;
}

.s-logo--invert {
    filter: invert(1) grayscale(1) brightness(1.1);
    mix-blend-mode: screen;
}

.s-note {
    margin: .5rem 0 0 0;
    font-size: .9rem;
    color: rgba(255,255,255,.9);
}

@media (max-width: 576px) {
    .sponsors-shell {
        padding: 12px 14px;
    }

    .s-logos {
        gap: 14px 16px;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }

    .s-logo {
        height: 44px;
    }
}

.s-logo-card {
    background: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.06);
}

/* === A11Y TOOLBAR === */
.a11y-toolbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .4rem .6rem;
    border-bottom: 1px solid rgba(255,255,255,.22);
}

.a11y-buttons {
    display: inline-flex;
    gap: .35rem;
}

.a11y-btn {
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.12);
    color: #fff;
    border-radius: 999px;
    padding: .35rem .6rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

    .a11y-btn:hover, .a11y-btn:focus-visible {
        outline: none;
        background: rgba(255,255,255,.22);
    }

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

    .skip-link:focus {
        position: static;
        width: auto;
        height: auto;
        padding: .25rem .5rem;
        background: #fff;
        color: #000;
        border-radius: .5rem;
    }

/* === TRYB WYSOKIEGO KONTRASTU — ZINTEGROWANE OVERRIDES === */
body.a11y-contrast {
    background: #000 !important;
    color: #fff !important;
    /* zmienne BS, modal */
    --bs-body-bg: #000;
    --bs-body-color: #fff;
    --bs-modal-bg: #000;
    --bs-modal-color: #fff;
    --bs-modal-border-color: #fff;
    --bs-modal-header-border-color: #fff;
    --bs-modal-footer-border-color: #fff;
}

    /* powierzchnie i podstawowe komponenty */
    body.a11y-contrast .navbar,
    body.a11y-contrast .sponsors-shell,
    body.a11y-contrast #searchForm,
    body.a11y-contrast .month-sheet,
    body.a11y-contrast .dayinfo-stat,
    body.a11y-contrast #results.surface {
        background: #000 !important;
        color: #fff !important;
        border-color: #fff !important;
        box-shadow: none !important;
    }

    /* linki */
    body.a11y-contrast a,
    body.a11y-contrast .nav-item a,
    body.a11y-contrast .btn-link {
        color: #0ff !important;
        text-decoration: underline;
    }

    /* formularze */
    body.a11y-contrast .form-control,
    body.a11y-contrast .form-select,
    body.a11y-contrast .year-input {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }

    body.a11y-contrast .help-icon {
        color: #000 !important;
        background: #fff !important;
        border-color: #fff !important;
    }

    /* taby hero */
    body.a11y-contrast .nav-tabs-hero::before {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    body.a11y-contrast .nav-tabs-hero .nav-link {
        color: #fff !important;
        background: transparent !important;
        border: 1px solid #fff !important;
        border-radius: 999px !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }

        body.a11y-contrast .nav-tabs-hero .nav-link.active {
            background: #fff !important;
            color: #000 !important;
            border-color: #fff !important;
        }

    body.a11y-contrast .nav-tabs.nav-tabs-hero .nav-link.active {
        border-bottom: 0 !important;
    }

    /* tabela wyników */
    body.a11y-contrast .results-table thead th {
        background: #111 !important;
        color: #fff !important;
        border-bottom: 2px solid #fff !important;
        border-color: #fff !important;
    }

    body.a11y-contrast .results-table tbody tr {
        background: #000 !important;
    }

        body.a11y-contrast .results-table tbody tr:nth-child(odd) {
            background: #0a0a0a !important;
        }

    body.a11y-contrast .results-table tbody th,
    body.a11y-contrast .results-table tbody td {
        color: #fff !important;
        border-bottom: 1px solid #fff !important;
    }

    /* kontener wyników + cała treść w nim */
    body.a11y-contrast #results,
    body.a11y-contrast #results * {
        color: #fff !important;
        opacity: 1 !important;
        text-shadow: none !important;
    }

        body.a11y-contrast #results,
        body.a11y-contrast #results a {
            background-color: #000 !important;
        }

            body.a11y-contrast #results a {
                color: #0ff !important;
                text-decoration: underline !important;
            }

    /* pastylki/kalendarz */
    body.a11y-contrast .month-grid .cell,
    body.a11y-contrast .pill-weekday,
    body.a11y-contrast .pill-saturday,
    body.a11y-contrast .pill-sunday,
    body.a11y-contrast .pill-event {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
        box-shadow: none !important;
    }

    /* DayInfo – absolutnie cała sekcja i kontrolki */
    body.a11y-contrast .dayinfo,
    body.a11y-contrast .dayinfo-panel,
    body.a11y-contrast .dayinfo *,
    body.a11y-contrast .dayinfo-panel *,
    body.a11y-contrast #sun-calc,
    body.a11y-contrast #sun-calc * {
        color: #fff !important;
        opacity: 1 !important;
        text-shadow: none !important;
    }

        body.a11y-contrast #sun-calc select.form-select,
        body.a11y-contrast #sun-calc .form-check-input {
            background: #000 !important;
            color: #fff !important;
            border: 2px solid #fff !important;
            box-shadow: none !important;
        }

    /* stat cards w DayInfo */
    body.a11y-contrast .dayinfo-stat {
        background: #000 !important;
        border: 2px solid #fff !important;
        box-shadow: none !important;
    }

        body.a11y-contrast .dayinfo-stat .card-body {
            color: #fff !important;
        }

        body.a11y-contrast .dayinfo-stat .stat-label,
        body.a11y-contrast .dayinfo-stat .stat-value,
        body.a11y-contrast .dayinfo-stat .stat-value-lg {
            color: #fff !important;
            text-shadow: none !important;
        }

    /* modal (Bootstrap) */
    body.a11y-contrast .modal,
    body.a11y-contrast .modal-dialog,
    body.a11y-contrast .modal-content {
        background-color: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
        box-shadow: none !important;
    }

    body.a11y-contrast .modal-header,
    body.a11y-contrast .modal-body,
    body.a11y-contrast .modal-footer {
        background-color: #000 !important;
        color: #fff !important;
        border-color: #fff !important;
    }

        body.a11y-contrast .modal-header .btn-close {
            background: #fff !important;
            opacity: 1 !important;
            border-radius: 999px !important;
        }

    body.a11y-contrast .modal-backdrop.show {
        background-color: #000 !important;
        opacity: .85 !important;
    }

    body.a11y-contrast .modal-content::before,
    body.a11y-contrast .modal::before {
        content: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* przycisk Szukaj + paginacja */
    body.a11y-contrast .btn-continue,
    body.a11y-contrast .btn.btn-primary {
        background: #ffd24d !important;
        color: #000 !important;
        border: 2px solid #fff !important;
        box-shadow: none !important;
    }

        body.a11y-contrast .btn-continue:hover,
        body.a11y-contrast .btn.btn-primary:hover {
            background: #ffe680 !important;
            color: #000 !important;
        }

    body.a11y-contrast .pager-hero .page-link {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
        box-shadow: none !important;
    }

    body.a11y-contrast .pager-hero .page-item.active .page-link {
        background: #fff !important;
        color: #000 !important;
        border-color: #fff !important;
    }

    body.a11y-contrast .pager-hero .page-item.disabled .page-link {
        background: #000 !important;
        color: #777 !important;
        border-color: #777 !important;
    }

    /* focus */
    body.a11y-contrast :focus-visible {
        outline: 3px solid #ff0 !important;
        outline-offset: 2px !important;
    }

/* === POWIĘKSZANIE TEKSTU === */
html.a11y-fs-110 {
    font-size: 110% !important;
}

html.a11y-fs-125 {
    font-size: 125% !important;
}

html.a11y-fs-150 {
    font-size: 150% !important;
}

.day-cell[data-has-any="true"] {
    background-color: rgba(0,0,0,0.02);
}

.day-cell[data-has-church="true"]::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666; 
}

.day-cell[data-has-pl="true"]::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f0ad4e; 
}

.day-cell[data-has-world="true"]::marker { 
}
.day-cell[data-has-world="true"] .fw-bold.small::after {
    content: "";
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd; 
}

/* Neutralny kościelny */
.results-table .badge--church {
    background-color: #e9ecef; /* jasna szarość */
    color: #111; /* ciemny tekst */
    border: 1px solid rgba(0,0,0,.08);
}

/* Polska */
.results-table .badge--pl {
    background-color: #ffe08a; /* ciepły żółty */
    color: #000;
    border: 1px solid rgba(0,0,0,.08);
}

/* Świat */
.results-table .badge--world {
    background-color: #cfe2ff; /* jasny niebieski */
    color: #052c65; /* ciemny granat */
    border: 1px solid rgba(0,0,0,.08);
}

.day-cell[data-has-any="true"] {
    background-color: #f9fafb;
}

/* Kropka „Kośc.” w lewym górnym rogu tylko, gdy faktycznie jest wpis */
.day-cell[data-has-church="true"]::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
}

/* Kropka „PL” w prawym górnym rogu */
.day-cell[data-has-pl="true"]::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f0ad4e; 
}

/* Kropka „Świat” w prawym dolnym rogu */
.day-cell[data-has-world="true"] .fw-bold.small::after {
    content: "";
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd;
}

/* Tło komórki kotwicy (dzień święta) */
.day-cell.anchor-cell {
    background-color: #d9f0e1 !important; /* jasna zieleń, spokojna */
    box-shadow: inset 0 0 0 2px #0b6623; /* cienka, ciemnozielona ramka */
    font-weight: 600;
}

.app-footer {
    color: #fff;
    background: rgba(0,0,0,.35);
    backdrop-filter: saturate(120%) blur(2px);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    flex-wrap: wrap; 
}

.footer-copy {
    line-height: 1.3;
}

.footer-logo {
    max-height: 150px;
    height: auto;
    width: auto;
    align-content: center;
    object-fit: contain;
}

/* Mobile – tekst nad logo i wyśrodkowanie */
@media (max-width: 768px) {
    .footer-inner {
        justify-content: center;
        text-align: center;
    }

    .footer-copy {
        flex: 1 1 100%;
        order: 1;
    }

    .footer-logo {
        order: 2;
        align-content: center;
        max-height: 150px;
    }
}
