
/* ==========================================
   BAYPORT — SPIS TREŚCI MINI
   WERSJA BEZ STICKY
   PEŁNY CSS DO PODMIANY
   ========================================== */

/* ==========================================
   01. KARTA SPISU TREŚCI
   ========================================== */

.bp-toc {
    --bp-toc-blue: #26A8FF;
    --bp-toc-blue2: #2BA6DE;
    --bp-toc-navy: #102A43;
    --bp-toc-muted: #63758A;
    --bp-toc-line: #E2EBF2;
    --bp-toc-pale: #F5F9FC;
    --bp-toc-white: #FFFFFF;

    /* WYSOKOŚĆ PRZEWIJANEJ LISTY */
    --bp-toc-list-height: 250px;

    display: block !important;
    box-sizing: border-box;

    width: 100%;
    min-width: 0;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 12px 14px 0 !important;

    overflow: hidden;

    border: 1px solid var(--bp-toc-line);
    border-radius: 16px;

    background: var(--bp-toc-white);

    box-shadow: 0 14px 38px rgba(16,42,67,.075);

    color: var(--bp-toc-navy);

    font-family: Manrope, Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.45;

    isolation: isolate;
}

.bp-toc *,
.bp-toc *::before,
.bp-toc *::after {
    box-sizing: border-box;
}

/* ==========================================
   02. NAGŁÓWEK
   ========================================== */

.bp-toc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin: 0;
    padding: 0 0 9px;
}

.bp-toc__eyebrow {
    display: block;

    margin: 0 0 3px;

    color: var(--bp-toc-blue2);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .12em;
    line-height: 1.3;
}

.bp-toc__title {
    margin: 0 !important;
    padding: 0 !important;

    color: var(--bp-toc-navy);

    font-size: 18px;
    font-weight: 800;

    letter-spacing: -.025em;
    line-height: 1.2;
}

/* ==========================================
   03. PRZEWIJANA LISTA NAGŁÓWKÓW
   ========================================== */

html body .bp-toc[data-bp-toc="1"] .bp-toc__links {
    display: block;

    width: 100%;
    min-width: 0;

    min-height: 0 !important;

    height: var(--bp-toc-list-height) !important;
    max-height: var(--bp-toc-list-height) !important;

    margin: 0;
    padding: 0 !important;

    border-top: 1px solid var(--bp-toc-line);

    overflow-x: hidden !important;
    overflow-y: scroll !important;

    overscroll-behavior: contain;
    scrollbar-gutter: stable;

    scrollbar-width: thin;
    scrollbar-color: #9FC9E2 #F0F5F9;
}

/* ==========================================
   04. SUWAK — CHROME, EDGE, SAFARI
   ========================================== */

.bp-toc__links::-webkit-scrollbar {
    width: 6px;
}

.bp-toc__links::-webkit-scrollbar-track {
    background: #F0F5F9;
    border-radius: 6px;
}

.bp-toc__links::-webkit-scrollbar-thumb {
    background: #9FC9E2;
    border-radius: 6px;
}

.bp-toc__links::-webkit-scrollbar-thumb:hover {
    background: #26A8FF;
}

/* ==========================================
   05. LISTA
   ========================================== */

.bp-toc__list {
    display: block;

    list-style: none !important;

    margin: 0 !important;
    padding: 5px 0 !important;
}

.bp-toc__item {
    display: block;

    list-style: none !important;

    margin: 0 !important;
    padding: 0 !important;
}

.bp-toc__item::marker {
    content: "";
}

/* ==========================================
   06. LINKI SPISU TREŚCI
   ========================================== */

.bp-toc__link {
    display: block;
    position: relative;

    margin: 1px 0;
    padding: 7px 8px 7px 11px;

    overflow-wrap: anywhere;

    border-radius: 8px;

    color: #50657A !important;
    background: transparent;

    font: 600 12px/1.4 Manrope, Inter,
          "Segoe UI", Arial, sans-serif;

    text-decoration: none !important;

    transition: color .2s, background .2s;
}

/* ==========================================
   07. PASEK AKTYWNEGO NAGŁÓWKA
   ========================================== */

.bp-toc__link::before {
    content: "";

    position: absolute;

    top: 6px;
    bottom: 6px;
    left: 0;

    width: 3px;

    border-radius: 5px;
    background: transparent;

    transition: background .2s;
}

/* ==========================================
   08. NAGŁÓWKI H3
   ========================================== */

.bp-toc__item--h3 .bp-toc__link {
    padding-left: 21px;

    font-size: 11.5px;
    font-weight: 500;
}

/* ==========================================
   09. HOVER
   ========================================== */

.bp-toc__link:hover,
.bp-toc__link:focus-visible {
    color: var(--bp-toc-blue2) !important;
    background: #EDF8FF;
}

/* ==========================================
   10. AKTYWNY NAGŁÓWEK
   ========================================== */

.bp-toc__link.is-active {
    color: #1179BD !important;
    font-weight: 800;
    background: #EDF8FF;
}

.bp-toc__link.is-active::before {
    background: var(--bp-toc-blue);
}

/* ==========================================
   11. FOCUS
   ========================================== */

.bp-toc__link:focus-visible,
.bp-toc__toggle:focus-visible {
    outline: 2px solid var(--bp-toc-blue);
    outline-offset: 2px;
}

/* ==========================================
   12. STOPKA SPISU
   ========================================== */

.bp-toc__footer {
    display: flex;
    align-items: center;

    gap: 6px;

    min-height: 25px;
    height: 25px;

    margin: 0;

    border-top: 1px solid var(--bp-toc-line);

    color: #7A8A9B;

    font-size: 9px;
    font-weight: 500;
}

.bp-toc__footer-dot {
    flex: 0 0 5px;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: var(--bp-toc-blue);
}

/* ==========================================
   13. PLACEHOLDER
   ========================================== */

.bp-toc__placeholder {
    display: block;

    padding: 9px 4px;

    color: var(--bp-toc-muted);
    font-size: 11px;
}

/* ==========================================
   14. PRZYCISK ROZWIJANIA
   ========================================== */

.bp-toc__toggle {
    display: none;

    flex: 0 0 30px;

    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    padding: 0;

    border: 1px solid var(--bp-toc-line);
    border-radius: 8px;

    background: var(--bp-toc-pale);
    color: var(--bp-toc-navy);

    cursor: pointer;
}

.bp-toc__toggle svg {
    display: block;
    transition: transform .2s;
}

/* ==========================================
   15. PRZEWIJANIE DO NAGŁÓWKÓW
   ========================================== */

.bp-toc-target {
    scroll-margin-top: var(
        --bp-toc-heading-offset,
        120px
    );
}

/* ==========================================
   16. NISKIE EKRANY KOMPUTEROWE
   ========================================== */

@media (min-width: 768px) and (max-height: 850px) {

    .bp-toc {
        --bp-toc-list-height: 60px;
    }

}

/* ==========================================
   17. MOBILE
   ========================================== */

@media (max-width: 767px) {

    .bp-toc {
        --bp-toc-list-height: 110px;

        padding: 12px 13px 0 !important;
        border-radius: 13px;
    }

    .bp-toc__head {
        padding-bottom: 9px;
    }

    .bp-toc__title {
        font-size: 17px;
    }

    .bp-toc__toggle {
        display: inline-flex;
    }

    /* ZWINIĘTY SPIS */

    html body
    .bp-toc[data-mobile-open="no"]
    .bp-toc__links {
        display: none !important;
    }

    /* ROZWINIĘTY SPIS */

    html body
    .bp-toc[data-mobile-open="yes"]
    .bp-toc__links {
        display: block !important;
    }

    .bp-toc[data-mobile-open="yes"]
    .bp-toc__toggle svg {
        transform: rotate(180deg);
    }

    .bp-toc__footer {
        min-height: 25px;
    }
}

/* ==========================================
   18. OGRANICZENIE ANIMACJI
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    .bp-toc__link,
    .bp-toc__link::before,
    .bp-toc__toggle svg {
        transition: none;
    }
}
