/**
 * Плавающая карточка согласия с cookies (не полоса у футера).
 */
/* !important: чтобы не перебивалось порядком загрузки CSS; привязка к viewport */
.cookie-consent {
    position: fixed !important;
    z-index: 10050;
    margin: 0;
    background: #000;
    color: #e5e5e5;
    border: 1px solid #2a2a2a;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        0 2px 12px rgba(0, 0, 0, 0.25);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    border-radius: 0;
}

/* Десктоп / планшет: панель справа снизу */
@media (min-width: 576px) {
    .cookie-consent {
        right: max(20px, env(safe-area-inset-right, 0px));
        bottom: max(20px, env(safe-area-inset-bottom, 0px));
        left: auto;
        width: min(420px, calc(100vw - 40px));
    }
}

/* Мобильный: почти на всю ширину, но с отступами — «плавает» над контентом */
@media (max-width: 575.98px) {
    .cookie-consent {
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        width: auto;
    }
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent__inner {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 16px;
}

.cookie-consent__text {
    margin: 0;
    flex: 1 1 200px;
    color: #c4c4c4;
    font-size: 12px;
    font-weight: 400;
}

.cookie-consent__text strong {
    color: #fff;
    font-weight: 600;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    flex-shrink: 0;
}

.cookie-consent__link {
    color: #a3a3a3;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 12px;
    white-space: nowrap;
}

.cookie-consent__link:hover {
    color: #fff;
}

.cookie-consent__btn {
    appearance: none;
    border: 1px solid #fff;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border-radius: 0;
}

.cookie-consent__btn:hover {
    background: #000;
    color: #fff;
    border-color: #fff;
}

.cookie-consent__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .cookie-consent__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
    }

    /* Иначе flex-grow:1 тянет блок текста по высоте и оставляет дыру над кнопкой */
    .cookie-consent__text {
        flex: 0 1 auto;
    }

    .cookie-consent__actions {
        justify-content: stretch;
    }

    .cookie-consent__btn {
        width: 100%;
        text-align: center;
    }
}
