.cookie-consent,
.cookie-settings-button {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cookie-consent {
    position: fixed;
    z-index: 10000;
    right: clamp(16px, 2vw, 28px);
    bottom: clamp(16px, 2vw, 28px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    width: min(430px, calc(100vw - 32px));
    padding: 22px;
    color: #151923;
    background: #f8f9fd;
    border: 1px solid rgba(30, 54, 92, 0.14);
    border-radius: 22px;
    box-shadow:
        0 24px 70px rgba(3, 8, 18, 0.28),
        0 4px 16px rgba(3, 8, 18, 0.12);
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-consent[hidden] {
    display: none;
}

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

.cookie-consent__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #eaf1ff;
    background: #172033;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(137, 177, 245, 0.24);
}

.cookie-consent__content {
    min-width: 0;
}

.cookie-consent h2 {
    margin: 1px 0 8px;
    color: #101522;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.cookie-consent p {
    max-width: 56ch;
    margin: 0;
    color: #50596a;
    font-size: 0.9rem;
    line-height: 1.58;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.cookie-consent__button,
.cookie-settings-button {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.cookie-consent__button {
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 11px;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.2;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 160ms ease;
}

.cookie-consent__button--primary {
    color: #f5f8ff;
    background: #255fc7;
    box-shadow: 0 8px 20px rgba(37, 95, 199, 0.24);
}

.cookie-consent__button--primary:hover {
    background: #1e50ad;
    transform: translateY(-1px);
}

.cookie-consent__button--secondary {
    color: #30394a;
    background: transparent;
    border: 1px solid rgba(30, 54, 92, 0.18);
}

.cookie-consent__button--secondary:hover {
    color: #172033;
    background: #edf1f8;
    border-color: rgba(30, 54, 92, 0.28);
}

.cookie-consent__button:focus-visible,
.cookie-settings-button:focus-visible {
    outline: 3px solid #8bb4ff;
    outline-offset: 3px;
}

.cookie-settings-button {
    position: fixed;
    z-index: 9999;
    right: 18px;
    bottom: 18px;
    padding: 9px 12px;
    color: #dbe7fb;
    background: #151b27;
    border: 1px solid rgba(151, 183, 235, 0.22);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(3, 8, 18, 0.24);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-settings-button:hover {
    color: #f3f7ff;
    background: #202a3d;
    border-color: rgba(151, 183, 235, 0.38);
    transform: translateY(-1px);
}

.cookie-settings-button[hidden] {
    display: none;
}

@media (max-width: 600px) {
    .cookie-consent {
        right: 0;
        bottom: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        padding: 20px max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
    }

    .cookie-consent__mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .cookie-consent__actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .cookie-consent__button {
        width: 100%;
    }

    .cookie-settings-button {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-consent__button,
    .cookie-settings-button {
        transition: none;
    }
}
