/* ===== Cookie-баннер ===== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background: #14212b;
    color: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1 1 420px;
    min-width: 280px;
}

.cookie-banner__title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.cookie-banner__text p {
    font-size: 13px;
    line-height: 1.5;
    color: #d7e2ea;
}

.cookie-banner__text a {
    color: #00bbf4;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Кнопки согласия: «Принять» и «Отклонить» намеренно одинаковые по видимости */
.cookie-btn {
    border: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: opacity 0.2s;
}

.cookie-btn:hover {
    opacity: 0.85;
}

.cookie-btn--primary {
    background: #00bbf4;
    color: #fff;
}

.cookie-btn--secondary {
    background: #e8eef2;
    color: #14212b;
}

.cookie-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid #6b7d8a;
}

/* ===== Модальное окно настроек ===== */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal[hidden],
.cookie-banner[hidden],
.embed-placeholder[hidden] {
    display: none;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 28, 0.6);
}

.cookie-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px 26px;
    color: #14212b;
}

.cookie-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7d8a;
}

.cookie-modal__dialog h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.cookie-modal__intro {
    font-size: 13px;
    color: #4d616f;
    line-height: 1.5;
    margin-bottom: 18px;
}

.cookie-modal__categories {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.cookie-category {
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 14px 16px;
}

.cookie-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.cookie-category__title {
    font-weight: 700;
    font-size: 14px;
}

.cookie-category__always {
    font-size: 12px;
    font-weight: 600;
    color: #0d9d62;
}

.cookie-category p {
    font-size: 12.5px;
    color: #4d616f;
    line-height: 1.5;
}

.cookie-modal__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Переключатель */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch__slider {
    position: absolute;
    inset: 0;
    background: #c3ced6;
    border-radius: 24px;
    transition: background 0.2s;
}

.cookie-switch__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background: #00bbf4;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
    transform: translateX(20px);
}

/* Плейсхолдер вместо внешнего embed-контента (Google Maps) до согласия */
.embed-placeholder {
    background: #eef3f6;
    border: 1px dashed #b9c6cf;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    min-height: 300px;
    gap: 10px;
}

.embed-placeholder h4 {
    font-size: 16px;
    color: #14212b;
}

.embed-placeholder p {
    font-size: 13px;
    color: #4d616f;
    max-width: 420px;
    line-height: 1.5;
}

.embed-placeholder .cookie-btn {
    margin-top: 6px;
}

@media (max-width: 600px) {
    .cookie-banner__actions {
        width: 100%;
    }

    .cookie-banner__actions .cookie-btn {
        flex: 1 1 auto;
    }
}
