/**
 * iLogist — Cookie consent banner (hybrid model).
 *
 * Логіка:
 *   - З'являється через 3 сек після завантаження сторінки
 *   - 2 кнопки: "Прийняти" (explicit) + посилання "Деталі" → /privacy.html
 *   - Авто-зникає через 15 сек = implicit consent
 *   - Після consent (будь-якого) — банер більше не показується (localStorage)
 *   - GA4 + Clarity активуються ТІЛЬКИ після consent
 */

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* Лівий кут, не розтягуємо на всю ширину */
    max-width: 420px;
    background: rgba(11, 25, 44, 0.55);
    color: #fff;
    padding: 18px 22px;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 9990000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    font-family: 'Manrope', 'Poppins', system-ui, -apple-system, sans-serif;

    /* Initial state (hidden, ready to animate in from bottom-left) */
    opacity: 0;
    transform: translate(-12px, 24px);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

.cookie-banner.is-fading {
    opacity: 0;
    transform: translate(-12px, 24px);
}

.cookie-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cookie-banner__details {
    color: #ffb733;
    text-decoration: none;
    margin-left: 6px;
    white-space: nowrap;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 183, 51, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cookie-banner__details:hover,
.cookie-banner__details:focus {
    color: #ffd17a;
    border-bottom-color: #ffd17a;
}

.cookie-banner__accept {
    align-self: flex-start;
    background: #fca311;
    color: #0b192c;
    border: 0;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-banner__accept:hover,
.cookie-banner__accept:focus {
    background: #ffb733;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(252, 163, 17, 0.4);
    outline: none;
}

.cookie-banner__accept:active {
    transform: translateY(0);
}

@media (max-width: 575px) {
    .cookie-banner {
        max-width: none;
        right: 12px;
        left: 12px;
        bottom: 12px;
        padding: 16px 18px;
        gap: 12px;
    }
    .cookie-banner__text {
        font-size: 13.5px;
    }
    .cookie-banner__accept {
        align-self: stretch;
        padding: 12px;
    }
}
