/*
 * Баннер согласия на cookies. Подключается на всех страницах, включая страницу записи
 * плагина, где основной слой bp-redesign.css не грузится, — поэтому всё здесь своё.
 */

.bp-consent {
    --bpc-ink: #1D1D1B;
    --bpc-text: #4A4A49;
    --bpc-line: #CAC1BA;
    --bpc-btn: #E69369;          /* как --bp-btn в bp-redesign.css */
    --bpc-btn-hover: #C47D59;

    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1200;
    box-sizing: border-box;
    width: min(440px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--bpc-line);
    border-radius: 16px;
    background: rgba(246, 243, 241, .96);
    -webkit-backdrop-filter: blur(21px);
    backdrop-filter: blur(21px);
    box-shadow: 0 18px 48px rgba(29, 29, 27, .18);
    color: var(--bpc-text);
    font: 400 14px/1.55 Inter, 'BPF Inter', 'Helvetica Neue', Arial, sans-serif;
    text-align: left;
}

.bp-consent[hidden] {
    display: none;
}

.bp-consent *,
.bp-consent *::before,
.bp-consent *::after {
    box-sizing: border-box;
}

.bp-consent .bp-consent__title {
    margin: 0 0 8px;
    color: var(--bpc-ink);
    font: 400 22px/1.3 Lora, 'BPF Lora', Georgia, serif;
}

.bp-consent .bp-consent__text {
    margin: 0 0 16px;
    color: var(--bpc-text);
    font: inherit;
}

.bp-consent a,
.bp-consent a:visited {
    color: #4C392B;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bp-consent a:hover {
    color: var(--bpc-ink);
}

.bp-consent__prefs {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 0;
    border-top: 1px solid var(--bpc-line);
    border-bottom: 1px solid var(--bpc-line);
}

.bp-consent__prefs[hidden] {
    display: none;
}

.bp-consent .bp-consent__opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--bpc-text);
    font: 400 13px/1.45 Inter, 'BPF Inter', 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
}

.bp-consent .bp-consent__opt input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #4C392B;
}

.bp-consent__opt strong {
    display: block;
    color: var(--bpc-ink);
    font-weight: 600;
}

.bp-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bp-consent .bp-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0 20px;
    border: 1px solid var(--bpc-line);
    border-radius: 100px;
    background: #fff;
    color: var(--bpc-ink);
    font: 700 12px/1 Inter, 'BPF Inter', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.bp-consent .bp-consent__btn:hover {
    border-color: var(--bpc-btn);
}

.bp-consent .bp-consent__btn[hidden] {
    display: none;
}

.bp-consent .bp-consent__btn--primary {
    border-color: var(--bpc-btn);
    background: var(--bpc-btn);
    color: #fff;
}

.bp-consent .bp-consent__btn--primary:hover {
    border-color: var(--bpc-btn-hover);
    background: var(--bpc-btn-hover);
}

.bp-consent .bp-consent__btn--link {
    padding: 0 8px;
    border-color: transparent;
    background: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bp-consent .bp-consent__btn:focus-visible {
    outline: 2px solid #4C392B;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .bp-consent {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-height: calc(100vh - 24px);
        padding: 20px;
    }

    .bp-consent .bp-consent__title {
        font-size: 20px;
    }

    .bp-consent .bp-consent__btn {
        flex: 1 1 auto;
    }

    .bp-consent .bp-consent__btn--link {
        flex: 0 0 100%;
    }
}
