/* Header contact dropdown: two Mogilev offices */
.b-contacts__link {
    height: 52px;
    width: auto;
    min-width: 248px;
    padding: 0 48px 0 10px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #1b2225;
    box-shadow: 0 8px 24px rgba(12, 30, 38, .16);
    gap: 10px;
}

.b-contacts__link:hover,
.b-contacts__link.js-act {
    background: #fff;
    color: #1b2225;
}

/* The base theme makes the active contact trigger transparent in the sticky header. */
.l-header.js-fixed .b-contacts__link,
.l-header.js-fixed .b-contacts__link:hover,
.l-header.js-fixed .b-contacts__link.js-act {
    background: #fff;
    color: #1b2225;
}

.b-contacts__link::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #1b2225;
    border-bottom: 2px solid #1b2225;
    background: none;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.b-contacts__link.js-act::after {
    margin-top: -2px;
    transform: rotate(225deg);
}

.b-contacts__trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #eef8e8;
    color: #66b913;
}

.b-contacts__trigger-icon svg {
    width: 19px;
    height: 19px;
}

.b-contacts__content {
    line-height: 1;
}

.b-contacts__title {
    white-space: nowrap;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.01em;
}

.b-contacts__popup.b-office-dropdown {
    width: 680px;
    max-width: calc(100vw - 48px);
    top: calc(100% + 12px);
    right: 0;
    padding: 18px;
    border: 1px solid rgba(27, 34, 37, .08);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(9, 28, 37, .22);
}

.b-office-dropdown__office {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 22px;
    padding: 18px 20px;
    margin-bottom: 12px;
    border: 1px solid #e7ecee;
    border-radius: 16px;
    background: #fff;
}

.b-office-dropdown__main {
    min-width: 0;
}

.b-office-dropdown__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.b-office-dropdown__office-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #eef8e8;
    color: #62b315;
}

.b-office-dropdown__office-icon svg {
    width: 23px;
    height: 23px;
}

.b-office-dropdown__title {
    color: #1b2225;
    font-size: 18px;
    line-height: 1.22;
    font-weight: 700;
}

.b-office-dropdown__subtitle {
    margin-top: 4px;
    color: #7d878c;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 400;
}

.b-office-dropdown__detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 9px;
    color: #394348;
    font-size: 14px;
    line-height: 1.42;
}

.b-office-dropdown__detail_address,
.b-office-dropdown__detail_address:visited {
    color: #394348;
    text-decoration: none;
    cursor: pointer;
    transition: color .2s ease;
}

.b-office-dropdown__detail_address .b-office-dropdown__detail-icon {
    transition: color .2s ease, background-color .2s ease;
}

.b-office-dropdown__detail_address:hover,
.b-office-dropdown__detail_address:focus-visible {
    color: #66b913;
    text-decoration: none;
}

.b-office-dropdown__detail_address:hover .b-office-dropdown__detail-icon,
.b-office-dropdown__detail_address:focus-visible .b-office-dropdown__detail-icon {
    color: #66b913;
    background: #eef8e6;
}

.b-office-dropdown__detail_address:focus-visible {
    outline: 2px solid rgba(102, 185, 19, .35);
    outline-offset: 2px;
    border-radius: 6px;
}

.b-office-dropdown__detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    margin-top: -3px;
    border-radius: 50%;
    background: #f2f5f6;
    color: #59666c;
}

.b-office-dropdown__detail-icon svg {
    width: 15px;
    height: 15px;
}

.b-office-dropdown__detail_phone a {
    color: #1b2225;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease;
}

.b-office-dropdown__detail_phone a:hover {
    color: #66b913;
}

.b-office-dropdown__schedule {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 22px;
    border-left: 1px solid #e4e9eb;
    color: #1b2225;
}

.b-office-dropdown__schedule-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
}

.b-office-dropdown__schedule-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: #66b913;
}

.b-office-dropdown__schedule-icon svg {
    width: 20px;
    height: 20px;
}

.b-office-dropdown__schedule-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 28px;
    color: #30393d;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    white-space: nowrap;
}

.b-office-dropdown__callback.b-popup__callback-btn {
    display: flex;
    width: 100%;
    height: 52px;
    margin-top: 4px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: none;
}

@media (max-width: 767px) {
    /* The legacy theme has body { min-width: 360px }, which creates an x-scroll when a classic scrollbar reduces the layout viewport. */
    body {
        min-width: 0;
    }

    .l-header__inner,
    .l-header__l,
    .l-header__r,
    .l-header__contacts {
        min-width: 0;
    }
    /* The external Venyoo callback widget otherwise overlaps the open contacts panel. */
    body.l-contacts-layout iframe[src*="venyoo"],
    body.l-contacts-layout [id*="venyoo"],
    body.l-contacts-layout [class*="venyoo"] {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .b-contacts__link {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .35);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 6px 18px rgba(12, 30, 38, .15);
    }

    .b-contacts__link::after,
    .b-contacts__content {
        display: none;
    }

    .b-contacts__trigger-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        background: transparent;
    }

    /* Inset from both viewport edges: no 100vw + negative-right overflow. */
    .b-contacts__popup.b-office-dropdown {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 68px;
        width: auto;
        max-width: none;
        padding: 10px;
        border-radius: 17px;
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .b-office-dropdown__office {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 13px;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .b-office-dropdown__heading {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 9px;
    }

    .b-office-dropdown__office-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .b-office-dropdown__office-icon svg {
        width: 20px;
        height: 20px;
    }

    .b-office-dropdown__title {
        font-size: 15px;
        line-height: 1.22;
    }

    .b-office-dropdown__subtitle {
        margin-top: 2px;
        font-size: 12px;
        line-height: 1.25;
    }

    .b-office-dropdown__detail {
        gap: 8px;
        margin-top: 7px;
        font-size: 13px;
        line-height: 1.35;
    }

    .b-office-dropdown__detail-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        margin-top: -3px;
    }

    .b-office-dropdown__detail-icon svg {
        width: 14px;
        height: 14px;
    }

    .b-office-dropdown__detail_phone a {
        font-size: 16px;
        line-height: 1.2;
    }

    .b-office-dropdown__schedule {
        display: block;
        padding: 10px 0 0;
        border-left: 0;
        border-top: 1px solid #e4e9eb;
    }

    .b-office-dropdown__schedule-title {
        gap: 7px;
        margin-bottom: 5px;
        font-size: 13px;
        line-height: 1.25;
    }

    .b-office-dropdown__schedule-icon,
    .b-office-dropdown__schedule-icon svg {
        width: 18px;
        height: 18px;
    }

    .b-office-dropdown__schedule-lines {
        gap: 2px;
        padding-left: 25px;
        font-size: 12px;
        line-height: 1.35;
        white-space: normal;
    }

    .b-office-dropdown__callback.b-popup__callback-btn {
        position: sticky;
        bottom: 0;
        z-index: 3;
        height: 44px;
        margin-top: 0;
        border: 3px solid #fff;
        font-size: 14px;
        box-shadow: 0 -8px 18px rgba(255, 255, 255, .92);
    }
}

@media (max-width: 380px) {
    .b-contacts__popup.b-office-dropdown {
        left: 8px;
        right: 8px;
        padding: 8px;
    }

    .b-office-dropdown__office {
        padding: 11px 12px;
    }

    .b-office-dropdown__title {
        font-size: 14.5px;
    }
}
