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

.cookie-consent {
    --cookie-accent: var(--e-global-color-lime-green, #1554a0);
    --cookie-accent-soft: #edf4fc;
    --cookie-ink: #1a2733;
    --cookie-muted: #6b7885;
    position: fixed;
    z-index: 10000;
    left: 20px;
    bottom: 20px;
    width: min(300px, calc(100vw - 40px));
    pointer-events: none;
}

.cookie-consent__card {
    overflow: hidden;
    padding: 22px;
    color: var(--cookie-ink);
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid #eceff2;
    border-radius: 18px;
    box-shadow: 0 22px 46px -18px rgba(26, 39, 51, 0.45);
    opacity: 0;
    pointer-events: auto;
    transform: translateY(24px);
    transition: opacity 300ms ease, transform 300ms ease;
}

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

.cookie-consent__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    color: var(--cookie-accent);
    background: var(--cookie-accent-soft);
    border-radius: 14px;
    font-size: 23px;
}

.cookie-consent h2 {
    margin: 0 0 8px;
    color: var(--cookie-ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.cookie-consent p {
    margin: 0;
    color: var(--cookie-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
}

.cookie-consent a {
    color: var(--cookie-accent);
    font-weight: 600;
    text-decoration: none;
}

.cookie-consent a:hover {
    text-decoration: underline;
}

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

.cookie-consent__secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.cookie-consent__button {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

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

.cookie-consent__button:focus-visible,
.cookie-consent__back:focus-visible,
.footer-cookie-settings:focus-visible,
.cookie-consent__preference:has(input:focus-visible) {
    outline: 3px solid rgba(21, 84, 160, 0.2);
    outline-offset: 3px;
}

.cookie-consent__button--primary {
    width: 100%;
    color: #ffffff;
    background: var(--cookie-accent);
    border-color: var(--cookie-accent);
}

.cookie-consent__button--primary:hover {
    color: #ffffff;
    background: #0d396f;
    border-color: #0d396f;
    box-shadow: 0 8px 20px rgba(21, 84, 160, 0.2);
}

.cookie-consent__button--secondary {
    color: #3a4753;
    background: #ffffff;
    border-color: #d7dee3;
    font-weight: 600;
}

.cookie-consent__button--secondary:hover {
    color: #1a2733;
    background: #f4f7f9;
    border-color: #cbd4da;
}

.cookie-consent__preferences > p {
    margin-bottom: 16px;
}

.cookie-consent__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: var(--cookie-accent);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cookie-consent__preference-list {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.cookie-consent__preference {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 12px;
    border: 1px solid #e4e9ed;
    border-radius: 12px;
    background: #f8fafb;
}

label.cookie-consent__preference {
    cursor: pointer;
}

.cookie-consent__preference div {
    min-width: 0;
}

.cookie-consent__preference strong,
.cookie-consent__preference span {
    display: block;
}

.cookie-consent__preference strong {
    margin-bottom: 2px;
    color: var(--cookie-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.cookie-consent__preference div > span {
    color: var(--cookie-muted);
    font-size: 10px;
    line-height: 1.35;
}

.cookie-consent__status {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: var(--cookie-accent);
    background: var(--cookie-accent-soft);
    border-radius: 50%;
    font-size: 10px;
    line-height: 24px;
    text-align: center;
}

.cookie-consent__preference input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.cookie-consent__switch {
    position: relative;
    width: 36px;
    height: 22px;
    flex: 0 0 auto;
    background: #cbd4da;
    border-radius: 999px;
    transition: background-color 160ms ease;
}

.cookie-consent__switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(26, 39, 51, 0.22);
    transition: transform 160ms ease;
}

.cookie-consent__preference input:checked + .cookie-consent__switch {
    background: var(--cookie-accent);
}

.cookie-consent__preference input:checked + .cookie-consent__switch::after {
    transform: translateX(14px);
}

.footer-cookie-settings {
    margin: 0 0 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.footer-cookie-settings:hover {
    color: #ffffff !important;
}

@media (max-width: 480px) {
    .cookie-consent {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }

    .cookie-consent__card {
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    .footer-cookie-settings {
        display: block;
        margin: 8px auto 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent__card,
    .cookie-consent__button,
    .cookie-consent__switch,
    .cookie-consent__switch::after {
        transition: none;
    }
}
