/*
 * common-chrome.css — крошки, подвал, модалки [PWRU-257].
 * Шапка — header-legacy.css [PWRU-285].
 */

/* ---- breadcrumbs (1:1 legacy #breadCrumb .breadcrumb) ---- */
.breadcrumbs-wrap {
    background: #eee;
    border-bottom: 0;
}
.breadcrumbs-wrap > .container { padding-left: 30px; padding-right: 15px; }
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
    margin: 14px 0 20px;
    padding: 0;
    color: #414141;
}
.breadcrumbs__item { display: inline-flex; align-items: center; }
.breadcrumbs__item:not(:last-child)::after {
    content: ">";
    margin: 0 5px;
    color: #8b8b8b;
}
.breadcrumbs__link { color: #2e4f9d; text-decoration: none; }
.breadcrumbs__link:hover { color: #2e4f9d; text-decoration: underline; }
.breadcrumbs__item:last-child .breadcrumbs__link { color: #5b5f66; cursor: default; } /* [PWRU-299] a11y: #8b8b8b (3.4:1) → #5b5f66 (5.4:1 на #eeeeee-подложке крошек), WCAG 1.4.3 */
.breadcrumbs__item:last-child .breadcrumbs__link:hover { text-decoration: none; }

/* ---- footer (1:1 с прод: белый, блок «Санофи» + утилитарные ссылки/дисклеймер) ---- */
.page-footer {
    margin-top: 40px;
    background: #fff;
    border-top: 1px solid #d3d3d3;
    color: var(--c-text);
    font-size: .875rem; /* 14px — 1:1 prod (было .9rem/14.4) */
}
.page-footer > .container { padding-top: 45px; padding-bottom: 70px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.footer-org p { margin: 0 0 .9em; color: var(--c-muted); }
.footer-org__name { font-weight: 700; color: var(--c-heading) !important; }
.footer-mat { font-size: .82rem; color: var(--c-muted); }
.footer-org__rights { font-size: .82rem; }
.footer-links {
    list-style: none;
    margin: 0 0 4.2em; /* prod: дисклеймер прижат ниже ссылок (~57px зазор) */
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}
.footer-links li { margin: 0; }
.footer-links a { color: var(--c-link); }
.footer-links .link-btn {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--c-link);
    cursor: pointer;
    text-decoration: underline;
}
.footer-disclaimer-text { color: var(--c-muted); font-size: .82rem; margin: 0; }

/* ---- to-top ---- */
#to_top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--c-primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .85rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 90;
}
#to_top.is-visible { opacity: 1; visibility: visible; }
#to_top:hover { background: var(--c-primary-dark); }

/* ---- external-link disclaimer modal ---- */
.ext-modal {
    position: fixed;
    inset: 0;
    background: rgba(38, 39, 43, .55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.ext-modal.is-open { display: flex; }
.ext-modal__dialog {
    background: #fff;
    border-radius: var(--radius);
    max-width: 460px;
    width: 100%;
    padding: 28px 24px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
.ext-modal__title { margin: 0 0 12px; }
.ext-modal__text { color: var(--c-text); }
.ext-modal__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 991px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- fixed legal bar (prod: empty .legal + footer_legal png, JS insertAfter .pageWrapper) ---- */
.legal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10%;
    opacity: 0.8;
    z-index: 109;
    pointer-events: none;
    background: transparent url("../media/footer-legal.png") no-repeat scroll center center;
    background-size: 100% auto;
    background-position: center bottom;
}

/* ---- floating map widget (prod: .to-consult-map-wrapper) ---- */
.to-consult-map-wrapper {
    cursor: pointer;
    transition: width 0.3s ease-in;
    position: fixed;
    background-color: #ed3239;
    bottom: 100px;
    right: 10vw;
    width: 68px;
    height: 68px;
    color: #fff;
    font-size: 14px;
    line-height: 1.25;
    padding: 13px;
    z-index: 98;
    border-radius: 50px;
    overflow: hidden;
    background-image: url("../media/pin.png");
    background-repeat: no-repeat;
    background-position: 16px 15px;
    box-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
    display: block;
    box-sizing: border-box;
}
.to-consult-map-wrapper::before {
    content: "";
    width: 75px;
    height: 70px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}
.to-consult-map-wrapper .to-consult-map {
    display: none;
    position: relative;
    right: 10px;
    top: 70px;
    white-space: nowrap;
}
.to-consult-map-wrapper .to-consult-map span {
    display: inline-block;
    vertical-align: middle;
}
.to-consult-map a { color: #fff; }
.to-consult-map a:hover { text-decoration: none; }
.to-consult-map-wrapper:hover .to-consult-map {
    display: inline-block;
    top: 0;
    width: 190px;
    line-height: 42px;
    vertical-align: middle;
}
.to-consult-map-wrapper:hover {
    width: 247px;
    padding-left: 60px;
}
body.where-to-get-a-consultation .to-consult-map-wrapper,
body.where-to-get-a-consultation-map .to-consult-map-wrapper {
    display: none;
}

@media screen and (min-width: 768px) and (max-width: 1000px) {
    .to-consult-map-wrapper { bottom: 60px; right: 10px; }
}

@media screen and (max-width: 767px) {
    .to-consult-map-wrapper:hover .to-consult-map { width: 222px; }
    .to-consult-map-wrapper .to-consult-map {
        display: inline-block;
        width: 222px;
        top: 0;
    }
    .to-consult-map-wrapper:hover {
        width: 300px;
        padding-left: 57px;
    }
    .to-consult-map-wrapper {
        width: 300px;
        right: calc(50% - 150px);
        height: 52px;
        padding: 15px;
        padding-left: 57px;
        bottom: 40px;
        background-position: 13px 7px;
    }
}
