/*
 * Повідомлення про cookie (Views/Shared/_CookieNotice): картка внизу ліворуч, на телефоні — на всю ширину.
 * Видима лише з data-cookie-notice="new" на <html> (ставить скрипт у <head> _Layout).
 */

.cookie-notice {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 35;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    box-sizing: border-box;
    width: 420px;
    max-width: calc(100vw - 32px);
    padding: 20px 22px;
    border-radius: 20px;
    background: var(--bg-light);
    box-shadow: var(--shadow-popup);
    color: var(--text-on-light);
    font-family: Roboto, sans-serif;
}

:root[data-cookie-notice="new"] .cookie-notice {
    display: flex;
    animation: cookie-notice-in 0.4s ease-out backwards;
}

.cookie-notice.is-closing {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease-in, transform 0.25s ease-in;
}

@keyframes cookie-notice-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.cookie-notice__text {
    margin: 0;
    color: var(--text-on-light);
    font-size: 14px;
    line-height: 1.5;
}

.cookie-notice__text .cookie-notice__link {
    border-bottom: 1px solid currentColor;
    color: var(--text-on-light-soft);
    font-weight: 600;
}

.cookie-notice__text .cookie-notice__link:hover {
    background: none;
    color: var(--text-on-light);
}

.cookie-notice__button {
    padding: 9px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow var(--glow-duration);
}

.cookie-notice__button:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}

@media (max-width: 700px) {
    .cookie-notice {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        left: 16px;
        width: auto;
        max-width: none;
        padding: 16px 18px;
    }

    .cookie-notice__button {
        align-self: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    :root[data-cookie-notice="new"] .cookie-notice {
        animation: none;
    }

    .cookie-notice.is-closing {
        transition: none;
    }
}
