.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding: 24px;
}

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

.cookie-consent__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cookie-consent__panel {
    position: relative;
    z-index: 1;

    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    padding: 32px;

    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;

    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.22),
        0 8px 24px rgba(15, 23, 42, 0.12);

    animation: cookieBannerIn 0.35s ease;
}

.cookie-consent__close {
    position: absolute;
    top: 20px;
    right: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    color: var(--color-text, #172033);
    background: #f2f4f7;
    border: 0;
    border-radius: 50%;

    font-size: 1.1rem;
    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.cookie-consent__close:hover {
    background: #e7eaf0;
    transform: scale(1.04);
}

.cookie-consent__header {
    display: flex;
    align-items: center;
    gap: 18px;

    padding-right: 48px;
    margin-bottom: 20px;
}

.cookie-consent__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 56px;
    height: 56px;

    color: #ffffff;
    background: var(--color-primary, #e5007d);
    border-radius: 18px;

    font-size: 1.55rem;

    box-shadow: 0 10px 24px rgba(230, 0, 126, 0.22);
}

.cookie-consent__eyebrow {
    display: block;

    margin-bottom: 3px;

    color: var(--color-primary, #e5007d);

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cookie-consent__header h2 {
    margin: 0;

    color: var(--color-heading, #172033);

    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
}

.cookie-consent__intro {
    color: var(--color-text, #4b5565);

    font-size: 0.98rem;
    line-height: 1.65;
}

.cookie-consent__intro p {
    margin: 0 0 10px;
}

.cookie-consent__intro p:last-child {
    margin-bottom: 0;
}

.cookie-consent__settings {
    display: grid;
    gap: 12px;

    margin-top: 24px;
}

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

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 20px;

    background: #f7f8fa;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
}

.cookie-category__content {
    flex: 1;
}

.cookie-category__heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 7px;
}

.cookie-category h3 {
    margin: 0;

    color: var(--color-heading, #172033);

    font-size: 1rem;
    font-weight: 800;
}

.cookie-category p {
    margin: 0;

    color: var(--color-text, #5c6678);

    font-size: 0.9rem;
    line-height: 1.55;
}

.cookie-category__status {
    display: inline-flex;

    padding: 4px 9px;

    color: #2f6f48;
    background: #e7f5ec;
    border-radius: 100px;

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cookie-switch {
    position: relative;

    display: inline-flex;
    flex: 0 0 auto;

    width: 52px;
    height: 30px;

    cursor: pointer;
}

.cookie-switch input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.cookie-switch__slider {
    position: absolute;
    inset: 0;

    background: #c8ced8;
    border-radius: 100px;

    transition: background 0.2s ease;
}

.cookie-switch__slider::after {
    content: "";

    position: absolute;
    top: 4px;
    left: 4px;

    width: 22px;
    height: 22px;

    background: #ffffff;
    border-radius: 50%;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);

    transition: transform 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background: var(--color-primary, #e5007d);
}

.cookie-switch input:checked + .cookie-switch__slider::after {
    transform: translateX(22px);
}

.cookie-switch--disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.cookie-consent__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;

    margin-top: 22px;
}

.cookie-consent__links a {
    color: var(--color-text, #4b5565);

    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(75, 85, 101, 0.35);
    text-underline-offset: 3px;
}

.cookie-consent__links a:hover {
    color: var(--color-primary, #e5007d);
}

.cookie-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin-top: 24px;
}

.cookie-button {
    min-height: 50px;
    padding: 12px 20px;

    border: 1px solid transparent;
    border-radius: 12px;

    font-family: inherit;
    font-size: 0.93rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.cookie-button:hover {
    transform: translateY(-1px);
}

.cookie-button--primary {
    color: #ffffff;
    background: var(--color-primary, #e5007d);

    box-shadow: 0 9px 22px rgba(230, 0, 126, 0.2);
}

.cookie-button--primary:hover {
    filter: brightness(0.95);
}

.cookie-button--secondary {
    color: var(--color-heading, #172033);
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.18);
}

.cookie-button--secondary:hover {
    background: #f7f8fa;
    border-color: rgba(15, 23, 42, 0.3);
}

.cookie-button--text {
    grid-column: 1 / -1;

    min-height: auto;
    padding: 7px 12px;

    color: var(--color-primary, #e5007d);
    background: transparent;
}

.cookie-button--text:hover {
    background: rgba(230, 0, 126, 0.06);
}

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

body.cookie-consent-open {
    overflow: hidden;
}

@keyframes cookieBannerIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767.98px) {
    .cookie-consent {
        align-items: flex-end;
        padding: 12px;
    }

    .cookie-consent__panel {
        max-height: calc(100vh - 24px);
        padding: 24px 20px;

        border-radius: 20px;
    }

    .cookie-consent__header {
        align-items: flex-start;
        gap: 14px;

        padding-right: 30px;
    }

    .cookie-consent__icon {
        width: 48px;
        height: 48px;

        border-radius: 15px;

        font-size: 1.3rem;
    }

    .cookie-category {
        align-items: flex-start;
        gap: 15px;

        padding: 17px;
    }

    .cookie-consent__actions {
        grid-template-columns: 1fr;
    }

    .cookie-button--text {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent__panel {
        animation: none;
    }

    .cookie-button,
    .cookie-consent__close,
    .cookie-switch__slider,
    .cookie-switch__slider::after {
        transition: none;
    }
}