/**
 * Баннер согласия с политикой обработки персональных данных (152-ФЗ).
 */

.fz152-consent {
    --fz152-bg: #f8f9fb;
    --fz152-border: rgba(15, 23, 42, 0.08);
    --fz152-text: #1e293b;
    --fz152-muted: #64748b;
    --fz152-accent: #0f172a;
    --fz152-accent-contrast: #fff;
    --fz152-radius: 14px;
    --fz152-shadow: 0 1px 2px rgba(15, 23, 42, 0.06),
        0 8px 24px rgba(15, 23, 42, 0.12);

    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-bottom)) 16px 20px;
    pointer-events: none;
    font-family: "Rubik", system-ui, -apple-system, sans-serif;
}

.fz152-consent--hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.fz152-consent:not(.fz152-consent--hidden) {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.fz152-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: auto;
}

.fz152-consent__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    pointer-events: auto;
    background: var(--fz152-bg);
    border: 1px solid var(--fz152-border);
    border-radius: var(--fz152-radius);
    box-shadow: var(--fz152-shadow);
    padding: 1.125rem 1.25rem;
}

@media (min-width: 640px) {
    .fz152-consent__panel {
        padding: 1.25rem 1.5rem;
    }
}

.fz152-consent__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .fz152-consent__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
    }
}

.fz152-consent__title {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--fz152-text);
    line-height: 1.35;
}

.fz152-consent__text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--fz152-muted);
}

@media (min-width: 640px) {
    .fz152-consent__text {
        font-size: 0.875rem;
    }
}

.fz152-consent__text a {
    color: var(--fz152-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fz152-consent__text a:hover {
    color: #2563eb;
}

.fz152-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fz152-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.4rem 1rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.fz152-consent__btn:active {
    transform: scale(0.98);
}

.fz152-consent__btn--primary {
    background: var(--fz152-accent);
    color: var(--fz152-accent-contrast);
}

.fz152-consent__btn--primary:hover {
    background: #1e293b;
}

.fz152-consent__btn--ghost {
    background: transparent;
    color: var(--fz152-muted);
    border: 1px solid var(--fz152-border);
}

.fz152-consent__btn--ghost:hover {
    color: var(--fz152-text);
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .fz152-consent {
        transition: none;
    }

    .fz152-consent__btn {
        transition: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .fz152-consent {
        transition: opacity 0.35s ease, visibility 0s linear;
    }

    .fz152-consent--hidden {
        transition: opacity 0.28s ease, visibility 0s linear 0.28s;
    }

    .fz152-consent__panel {
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .fz152-consent--hidden .fz152-consent__panel {
        transform: translateY(calc(100% + 24px));
    }
}
