/**
 * Баннер и окно настроек согласия.
 * Токены витрины: акцент #565656, текст #000, фон #fff, границы #ebebeb,
 * шрифт Montserrat, прямоугольные кнопки (border-radius: 0), базовый размер 1.4rem.
 */

.consent-banner,
.consent-dialog {
    font-family: "Montserrat", sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #000;
}

/* --- Баннер --- */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1055;
    background: #fff;
    border-top: 1px solid #ebebeb;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, .08);
    padding: 2rem 1.5rem;
}

.consent-banner__inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    align-items: center;
    justify-content: space-between;
}

.consent-banner__text {
    flex: 1 1 420px;
    min-width: 260px;
    margin: 0;
}

.consent-banner__title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0 0 .4rem;
}

.consent-banner__actions,
.consent-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Все три кнопки одного размера и веса: отклонить не должно быть «дороже», чем принять. */
.consent-btn {
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: .01em;
    line-height: 1.4;
    text-transform: uppercase;
    padding: 1.1rem 1.8rem;
    min-width: 150px;
    min-height: 44px;
    border-radius: 0;
    border: 1px solid #565656;
    background: transparent;
    color: #565656;
    cursor: pointer;
    transition: background-color .25s, color .25s;
}

.consent-btn:hover,
.consent-btn:focus-visible {
    background: #565656;
    color: #fff;
}

.consent-btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.consent-link {
    color: #565656;
    text-decoration: underline;
}

/* --- Окно настроек --- */
.consent-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1060;
}

.consent-dialog {
    position: fixed;
    z-index: 1065;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 3rem));
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ebebeb;
    padding: 2.5rem;
}

.consent-dialog__title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 .8rem;
}

.consent-dialog__intro {
    margin: 0 0 2rem;
    color: #333;
}

.consent-category {
    border-top: 1px solid #ebebeb;
    padding: 1.6rem 0;
}

.consent-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: .4rem;
}

.consent-category__title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.consent-category__text {
    margin: 0;
    color: #666;
    font-size: 1.3rem;
}

.consent-category__state {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #999;
    white-space: nowrap;
}

.consent-switch {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    cursor: pointer;
    white-space: nowrap;
}

.consent-switch input {
    width: 20px;
    height: 20px;
    accent-color: #565656;
    cursor: pointer;
}

.consent-dialog__actions {
    border-top: 1px solid #ebebeb;
    padding-top: 2rem;
    margin-top: .5rem;
}

.consent-lock-scroll {
    overflow: hidden;
}

/* --- Заглушка вместо стороннего контента (карта) --- */
.consent-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    text-align: center;
    padding: 3rem 2rem;
    background: #fafafa;
    border: 1px solid #ebebeb;
    color: #333;
    font-family: "Montserrat", sans-serif;
    font-size: 1.4rem;
    min-height: 260px;
}

.consent-placeholder__text {
    max-width: 480px;
    margin: 0;
    color: #666;
    font-size: 1.3rem;
}

@media (max-width: 575px) {
    .consent-banner {
        padding: 1.6rem 1.2rem;
        max-height: 85vh;
        overflow-y: auto;
    }

    .consent-banner__actions,
    .consent-dialog__actions {
        width: 100%;
    }

    /* На узком экране кнопки в столбик и во всю ширину — все одинаково доступны. */
    .consent-btn {
        flex: 1 1 100%;
        min-width: 0;
    }

    .consent-dialog {
        padding: 2rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .consent-btn {
        transition: none;
    }
}
