/* FNI: dolny pasek mobilny i okno wyboru punktu odbioru (telefon i tablet, do 1024 px). */

.fni-mobile-bar,
.fni-mobile-sheet,
.fni-mobile-notice {
    display: none;
}

@media (max-width: 1024px) {
    .fni-mobile-notice {
        display: block;
        padding: 8px 16px;
        background: #171d45;
        color: #dfe3f5;
        font-size: 13px;
        line-height: 19.5px;
        text-align: center;
    }

    /* F1c: przezroczysty nagłówek Kadence jest absolutny; zaczyna się pod paskiem (wysokość z JS, bez JS zostaje pozycja w przepływie). */
    body.transparent-header #masthead,
    body.mobile-transparent-header #masthead {
        top: var(--fni-notice-h, auto);
    }

    .fni-mobile-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        align-items: flex-end;
        justify-content: space-around;
        height: calc(62px + env(safe-area-inset-bottom));
        padding: 0 4px env(safe-area-inset-bottom);
        background: var(--global-palette9, #fff);
        border-top: 1px solid rgba(0,0,0,.1);
        box-shadow: 0 -2px 10px rgba(0,0,0,.06);
    }

    .fni-mobile-bar__btn {
        flex: 1 1 0;
        min-width: 0;
        height: 62px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0 2px;
        border: 0;
        background: transparent;
        color: var(--global-palette3, #1a202c);
        font-size: 11px;
        line-height: 1.1;
        text-decoration: none;
        cursor: pointer;
        box-shadow: none;
    }

    .fni-mobile-bar__btn:hover,
    .fni-mobile-bar__btn:focus {
        background: transparent;
        color: var(--global-palette1, #2b6cb0);
    }

    .fni-mobile-bar__label {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .fni-mobile-bar__btn--point {
        justify-content: flex-end;
        padding-bottom: 7px;
        font-weight: 600;
        color: var(--global-palette1, #2b6cb0);
    }

    .fni-mobile-bar__circle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        margin-top: -22px;
        border-radius: 50%;
        background: var(--global-palette1, #2b6cb0);
        color: #fff;
        border: 3px solid var(--global-palette9, #fff);
        box-shadow: 0 2px 8px rgba(0,0,0,.2);
    }

    .fni-mobile-bar--no-point .fni-mobile-bar__circle {
        animation: fni-mobile-bar-pulse 2s ease-in-out 3;
    }

    @keyframes fni-mobile-bar-pulse {
        50% { transform: scale(1.08); }
    }

    .fni-mobile-bar__cart-icon {
        position: relative;
        line-height: 0;
    }

    .fni-mobile-bar__count {
        position: absolute;
        top: -6px;
        right: -10px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 9px;
        background: var(--global-palette1, #2b6cb0);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
    }

    .fni-mobile-bar__count[data-count="0"] {
        display: none;
    }

    body {
        padding-bottom: calc(62px + env(safe-area-inset-bottom));
    }

    #mobile-header .site-header-item-navgation-popup-toggle {
        display: none;
    }

    #mobile-drawer .fni-global-location {
        display: none;
    }

    #cookie-notice {
        bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    }

    #kt-scroll-up,
    #kt-scroll-up-reader {
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }

    html.fni-mobile-bar-open {
        overflow: hidden;
    }

    /* ---------- okno wyboru punktu ---------- */

    .fni-mobile-sheet:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100000;
    }

    .fni-mobile-sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.45);
    }

    .fni-mobile-sheet__panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 88vh;
        overflow: auto;
        box-sizing: border-box;
        padding: 22px 16px calc(20px + env(safe-area-inset-bottom));
        background: #fff;
        border-radius: 16px 16px 0 0;
    }

    .fni-mobile-sheet__close {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        border: 0;
        background: transparent;
        box-shadow: none;
        color: #1a202c;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
    }

    .fni-mobile-sheet__title {
        margin: 0 36px 4px 0;
        font-size: 24px;
        font-weight: 700;
        line-height: 1.2;
        color: #1a202c;
    }

    .fni-mobile-sheet__subtitle {
        margin: 0 0 16px;
        font-size: 15px;
        line-height: 1.3;
        color: #4a5568;
    }

    .fni-mobile-sheet .fni-global-location {
        display: block;
        width: 100%;
        margin: 0;
        font-size: 16px;
    }

    .fni-mobile-sheet .fni-global-location__summary {
        display: none !important;
    }

    .fni-mobile-sheet .fni-global-location__panel {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: inherit !important;
    }

    .fni-mobile-sheet .fni-global-location__form {
        margin: 0 0 10px;
    }

    .fni-mobile-sheet .fni-global-location__option {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        min-height: 58px;
        box-sizing: border-box;
        padding: 10px 16px;
        border: 1px solid #d3d8e3;
        border-radius: 12px;
        background: #fff;
        color: #1a202c;
        font-size: 17px;
        font-weight: 600;
        text-align: left;
        box-shadow: none;
    }

    .fni-mobile-sheet .fni-global-location__option::before {
        content: "";
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z' fill='none' stroke='%231556c0' stroke-width='2'/%3E%3Ccircle cx='12' cy='9.5' r='2.5' fill='%231556c0'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .fni-mobile-sheet .fni-global-location__option::after {
        content: "";
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        box-sizing: border-box;
        margin-left: auto;
        border: 2px solid #6b7488;
        border-radius: 50%;
        background: #fff center / 16px 16px no-repeat;
    }

    .fni-mobile-sheet .fni-global-location__option > span:not(.fni-global-location__check) {
        flex: 1 1 auto;
        order: 1;
    }

    .fni-mobile-sheet .fni-global-location__option::before {
        order: 0;
    }

    .fni-mobile-sheet .fni-global-location__option::after {
        order: 2;
    }

    .fni-mobile-sheet .fni-global-location__check {
        display: none;
    }

    .fni-mobile-sheet .fni-global-location__option:hover,
    .fni-mobile-sheet .fni-global-location__option:focus-visible {
        background: #f5f8fe;
        color: #1a202c;
    }

    .fni-mobile-sheet .fni-global-location__option.is-selected {
        border-color: #1556c0;
        box-shadow: inset 0 0 0 1px #1556c0;
        background: #e9f1fd;
        color: #1a202c;
    }

    .fni-mobile-sheet .fni-global-location__option.is-selected::after {
        border-color: #1556c0;
        background-color: #1556c0;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    .fni-mobile-sheet .fni-global-location__hub {
        display: block;
        margin: 6px 0 0;
        padding: 10px 0 0;
        border: 0;
        font-size: 15px;
        text-align: center;
        color: #1556c0;
    }

    /* koszyk niepusty: komunikat zamiast wierszy */
    .fni-mobile-sheet .fni-global-location__locked {
        display: block;
        padding: 14px 16px;
        border: 1px solid #d3d8e3;
        border-radius: 12px;
        background: #f5f8fe;
        color: #1a202c;
        white-space: normal;
    }

    .fni-mobile-sheet .fni-global-location__locked small {
        display: block;
        margin-top: 6px;
        font-size: 14px;
        opacity: 1;
        color: #4a5568;
    }
}
