.consent-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
}

.consent-banner[hidden],
.consent-dialog[hidden] {
    display: none !important;
}

.consent-banner__panel {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    color: #f7faf7;
    background: #111511;
    border: 1px solid rgba(183, 255, 74, 0.26);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.consent-banner__copy {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.consent-banner__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    color: #101310;
    background: #b7ff4a;
    border-radius: 15px;
}

.consent-banner h2,
.consent-dialog h2 {
    margin: 0 0 8px;
    font: 600 23px/1.2 'Space Grotesk', sans-serif;
    letter-spacing: -0.03em;
}

.consent-banner p,
.consent-dialog p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.65;
}

.consent-banner a,
.consent-dialog a {
    color: #b7ff4a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.consent-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.consent-button {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #f7faf7;
    background: transparent;
    font: 700 13px/1 'Manrope', sans-serif;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.consent-button:hover,
.consent-button:focus-visible {
    color: #101310;
    background: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
    outline: none;
}

.consent-button--primary {
    color: #101310;
    background: #b7ff4a;
    border-color: #b7ff4a;
}

.consent-button--primary:hover,
.consent-button--primary:focus-visible {
    background: #ffffff;
    border-color: #ffffff;
}

.consent-button:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none;
}

.consent-status {
    grid-column: 1 / -1;
    min-height: 0;
    margin: -12px 0 0 66px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.consent-status:empty {
    display: none;
}

.consent-status.is-error {
    color: #ffb4b4;
}

.consent-dialog {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(4, 6, 4, 0.76);
    backdrop-filter: blur(8px);
}

.consent-dialog__panel {
    width: min(620px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 32px;
    color: #f7faf7;
    background: #111511;
    border: 1px solid rgba(183, 255, 74, 0.24);
    border-radius: 28px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
}

.consent-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.consent-dialog__close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
}

.consent-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.consent-option h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 16px;
}

.consent-option__required {
    color: #b7ff4a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.consent-switch {
    position: relative;
    width: 52px;
    height: 30px;
}

.consent-switch input {
    position: absolute;
    opacity: 0;
}

.consent-switch input + span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #394039;
    cursor: pointer;
    transition: background 160ms ease;
}

.consent-switch input + span::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 4px;
    top: 4px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 160ms ease;
}

.consent-switch input:checked + span {
    background: #b7ff4a;
}

.consent-switch input:checked + span::after {
    transform: translateX(22px);
    background: #101310;
}

.consent-switch input:focus-visible + span {
    outline: 3px solid rgba(183, 255, 74, 0.36);
    outline-offset: 3px;
}

.consent-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.consent-dialog .consent-status {
    margin: 14px 0 0;
    text-align: right;
}

.consent-dialog-open {
    overflow: hidden;
}

.privacy-settings-link {
    padding: 0;
    border: 0;
    color: var(--primary-light);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.privacy-settings-link:hover,
.privacy-settings-link:focus-visible {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 820px) {
    .consent-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .consent-banner__panel {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
        border-radius: 20px;
    }

    .consent-actions {
        justify-content: stretch;
    }

    .consent-actions .consent-button {
        flex: 1 1 140px;
    }

    .consent-status {
        margin: -8px 0 0;
    }
}

@media (max-width: 520px) {
    .consent-banner__icon {
        display: none;
    }

    .consent-dialog {
        padding: 12px;
        align-items: end;
    }

    .consent-dialog__panel {
        max-height: calc(100vh - 24px);
        padding: 24px 20px;
        border-radius: 24px;
    }

    .consent-dialog__actions .consent-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .consent-button,
    .consent-switch span,
    .consent-switch span::after {
        transition: none;
    }
}
