@charset "UTF-8";

/* Нижний мобильный tab bar + bottom-sheet фильтров (≤767px) */

.site-tabbar {
    --site-tabbar-bg: #1a1a1a;
    --site-tabbar-border: rgba(255, 255, 255, 0.1);
    --site-tabbar-text: rgba(255, 255, 255, 0.72);
    --site-tabbar-active: #ffffff;
    --site-tabbar-active-bg: rgba(0, 143, 212, 0.28);
    --site-tabbar-accent: #008fd4;
    --site-tabbar-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
    --site-tabbar-z: 100000010;
    display: none;
}

.rs-mf-sheet {
    display: none;
}

@media (max-width: 767px) {
    .site-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--site-tabbar-z);
        display: flex;
        align-items: stretch;
        width: 100%;
        box-sizing: border-box;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        background: var(--site-tabbar-bg);
        border-top: 1px solid var(--site-tabbar-border);
        box-shadow: var(--site-tabbar-shadow);
    }

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

    #cookie-banner {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        z-index: 100000005;
    }

    body.rs-mf-open #cookie-banner {
        display: none !important;
    }

    .site-tabbar__link {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 52px;
        margin: 0;
        padding: 5px 2px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--site-tabbar-text);
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.15;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        transition: color 0.18s ease, background-color 0.18s ease;
    }

    .site-tabbar__link:hover,
    .site-tabbar__link:focus-visible {
        color: var(--site-tabbar-active);
        outline: none;
    }

    .site-tabbar__link:focus-visible {
        box-shadow: 0 0 0 2px rgba(0, 143, 212, 0.55);
    }

    .site-tabbar__link:active {
        transform: scale(0.97);
    }

    .site-tabbar__link.is-active,
    .site-tabbar__link.is-open {
        color: var(--site-tabbar-active);
        background: var(--site-tabbar-active-bg);
    }

    .site-tabbar__link--call {
        color: #7fd0f5;
    }

    .site-tabbar__label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-tabbar__ico {
        display: block;
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Bottom sheet filter */
    .rs-mf-sheet {
        position: fixed;
        inset: 0;
        z-index: 100000020;
        display: none;
        align-items: flex-end;
        justify-content: center;
        background: rgba(0, 0, 0, 0.5);
        padding: 0;
        box-sizing: border-box;
    }

    .rs-mf-sheet.is-open {
        display: flex;
    }

    .rs-mf-sheet__dialog {
        width: 100%;
        max-width: 560px;
        max-height: min(88vh, 720px);
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
        transform: translateY(12px);
        opacity: 0;
        transition: transform 0.22s ease, opacity 0.22s ease;
        overflow: hidden;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .rs-mf-sheet.is-open .rs-mf-sheet__dialog {
        transform: translateY(0);
        opacity: 1;
    }

    .rs-mf-sheet__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px 10px;
        border-bottom: 1px solid #ececec;
        flex-shrink: 0;
    }

    .rs-mf-sheet__title {
        margin: 0;
        font: 700 18px/1.2 "Open Sans", Arial, Helvetica, sans-serif;
        color: #212121;
    }

    .rs-mf-sheet__close {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: #f2f2f2;
        color: #333;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .rs-mf-sheet__body {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 16px 16px;
        flex: 1 1 auto;
    }

    .rs-mf-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .rs-mf-field {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin: 0;
        font: 600 13px/1.2 "Open Sans", Arial, Helvetica, sans-serif;
        color: #333;
    }

    .rs-mf-field[hidden],
    .rs-mf-panel[hidden] {
        display: none !important;
    }

    .rs-mf-field select {
        width: 100%;
        height: 44px;
        padding: 0 12px;
        border: 1px solid #dfdfdf;
        border-radius: 8px;
        background: #fff;
        font: 400 15px/1.2 "Open Sans", Arial, Helvetica, sans-serif;
        color: #222;
        appearance: auto;
    }

    .rs-mf-submit {
        margin-top: 8px;
        width: 100%;
        min-height: 48px;
        border: 0;
        border-radius: 8px;
        background: #008fd4;
        color: #fff;
        font: 800 15px/1.2 "Open Sans", Arial, Helvetica, sans-serif;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
        box-shadow: 0 5px 20px rgba(19, 161, 230, 0.35);
        cursor: pointer;
    }

    .rs-mf-submit:active {
        transform: scale(0.99);
    }

    body.rs-mf-open {
        overflow: hidden;
    }

    /* прячем tabbar визуально под sheet, но оставляем место — sheet поверх */
    body.rs-mf-open .site-tabbar {
        pointer-events: none;
        opacity: 0.35;
    }

    /* Jivo: не перекрывать tabbar */
    body > jdiv,
    jdiv[class*="button_"],
    .globalClass_ET {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    .site-tabbar__link,
    .rs-mf-sheet__dialog {
        transition: none;
    }

    .site-tabbar__link:active,
    .rs-mf-submit:active {
        transform: none;
    }
}

/* Desktop: never show */
@media (min-width: 768px) {
    .site-tabbar,
    .rs-mf-sheet {
        display: none !important;
    }
}
