/* Компактный баннер cookie — левый нижний угол */

html.cookie-consent-ok .cookie-consent {
    display: none !important;
}

.cookie-consent {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 130;
    max-width: min(340px, calc(100vw - 20px));
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.cookie-consent.is-visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent.is-hiding {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.cookie-consent__box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #121b28f2;
    border: 1px solid #ffffff1a;
    border-radius: 12px;
    box-shadow: 0 8px 28px #00000070;
    backdrop-filter: blur(12px);
}

.cookie-consent__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4884ff33, #3acf6b22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    font-size: 0.85rem;
}

.cookie-consent__body {
    flex: 1;
    min-width: 0;
}

.cookie-consent__title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    line-height: 1.2;
}

.cookie-consent__text {
    margin: 2px 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #cbd5e1;
}

.cookie-consent__link {
    color: #60a5fa;
    text-decoration: none;
    white-space: nowrap;
}

.cookie-consent__link:hover {
    text-decoration: underline;
}

.cookie-consent__btn {
    flex-shrink: 0;
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4884ff, #3b6fd4);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.cookie-consent__btn:hover {
    opacity: 0.92;
}

.cookie-consent__btn:active {
    transform: scale(0.97);
}

/* Над мобильной нижней навигацией */
@media (max-width: 768px) {
    .cookie-consent {
        left: max(8px, env(safe-area-inset-left));
        bottom: calc(68px + env(safe-area-inset-bottom));
        max-width: min(300px, calc(100vw - 16px));
    }

    .cookie-consent__box {
        padding: 7px 8px;
        gap: 6px;
        border-radius: 10px;
    }

    .cookie-consent__icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .cookie-consent__title {
        font-size: 0.62rem;
    }

    .cookie-consent__text {
        font-size: 0.67rem;
        line-height: 1.3;
    }

    .cookie-consent__btn {
        min-width: 36px;
        height: 28px;
        padding: 0 10px;
        font-size: 0.7rem;
    }
}

/* Страницы без нижней моб. навигации */
@media (max-width: 768px) {
    body:not(:has(.mobile-bottom-nav)) .cookie-consent {
        bottom: max(10px, env(safe-area-inset-bottom));
    }
}

/* Auth-страницы, консультант справа — не перекрываем */
@media (min-width: 769px) {
    .cookie-consent {
        bottom: max(16px, env(safe-area-inset-bottom));
    }
}
