:root {
    --consent-green-950: #032c20;
    --consent-green-900: #063d2d;
    --consent-green-700: #075f46;
    --consent-green-100: #edf6f2;
    --consent-gold: #d6a92f;
    --consent-text: #10251e;
    --consent-muted: #60736b;
    --consent-border: rgba(3, 44, 32, .14);
}

.consent-banner[hidden],
.consent-modal[hidden],
.consent-toast[hidden] {
    display: none !important;
}

.consent-banner {
    position: fixed;
    z-index: 9997;
    right: 22px;
    bottom: 22px;
    left: 22px;
    display: grid;
    width: min(1180px, calc(100% - 44px));
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin: 0 auto;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 22px;
    background: rgba(3, 44, 32, .98);
    color: #fff;
    box-shadow: 0 28px 80px rgba(0, 28, 20, .34);
    backdrop-filter: blur(18px);
}

.consent-banner__icon {
    display: grid;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(214, 169, 47, .17);
    color: #f1c54c;
    font-size: 1.55rem;
    place-items: center;
}

.consent-banner__eyebrow {
    margin: 0 0 4px;
    color: #f1c54c;
    font-size: .63rem;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.consent-banner h2 {
    margin: 0;
    font-family: "Bricolage Grotesque", "Inter", sans-serif;
    font-size: 1.2rem;
    line-height: 1.1;
}

.consent-banner__content > p:last-child {
    max-width: 650px;
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: .73rem;
    line-height: 1.55;
}

.consent-banner a {
    color: #fff;
    font-weight: 750;
    text-underline-offset: 3px;
}

.consent-banner__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.consent-banner button,
.consent-modal button {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}

.consent-banner__actions button {
    padding: 10px 13px;
}

.consent-banner__actions button:nth-child(2) {
    background: rgba(255, 255, 255, .09);
}

.consent-banner__actions button:last-child {
    border-color: var(--consent-gold);
    background: var(--consent-gold);
    color: var(--consent-green-950);
}

.consent-banner button:focus-visible,
.consent-modal button:focus-visible,
.consent-modal a:focus-visible {
    outline: 3px solid rgba(241, 197, 76, .55);
    outline-offset: 3px;
}

.consent-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
}

.consent-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(0, 24, 17, .68) !important;
    backdrop-filter: blur(8px);
}

.consent-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    padding: 25px;
    border: 1px solid var(--consent-border);
    border-radius: 24px;
    background: #fff;
    color: var(--consent-text);
    box-shadow: 0 36px 100px rgba(0, 24, 17, .35);
}

.consent-modal__header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}

.consent-modal__header p {
    margin: 0 0 5px;
    color: #9b710c;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.consent-modal__header h2 {
    max-width: 540px;
    margin: 0;
    color: var(--consent-green-900);
    font-family: "Bricolage Grotesque", "Inter", sans-serif;
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    line-height: 1;
    letter-spacing: -.035em;
}

.consent-modal__close {
    display: grid;
    min-width: 42px;
    width: 42px;
    height: 42px;
    min-height: 42px !important;
    border-color: var(--consent-border) !important;
    color: var(--consent-green-900) !important;
    place-items: center;
}

.consent-modal__description {
    margin: 15px 0 20px;
    color: var(--consent-muted);
    font-size: .78rem;
    line-height: 1.65;
}

.consent-option {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 17px;
    border: 1px solid var(--consent-border);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.consent-option--locked {
    background: #f5f9f7;
    cursor: default;
}

.consent-option strong {
    display: block;
    color: var(--consent-green-900);
    font-size: .86rem;
}

.consent-option span:not(.consent-option__status):not(.consent-switch) {
    display: block;
    margin-top: 5px;
    color: var(--consent-muted);
    font-size: .71rem;
    line-height: 1.5;
}

.consent-option__status {
    flex: 0 0 auto;
    color: var(--consent-green-700);
    font-size: .67rem;
    font-weight: 850;
}

.consent-switch {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 28px;
}

.consent-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.consent-switch > span {
    position: absolute;
    inset: 0;
    margin: 0 !important;
    border-radius: 999px;
    background: #cbd7d2;
    transition: background .2s ease;
}

.consent-switch > span::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(3, 44, 32, .2);
    content: "";
    transition: transform .2s ease;
}

.consent-switch input:checked + span {
    background: #087653;
}

.consent-switch input:checked + span::after {
    transform: translateX(20px);
}

.consent-switch input:focus-visible + span {
    outline: 3px solid rgba(8, 118, 83, .24);
    outline-offset: 3px;
}

.consent-modal__links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    margin: 18px 0 0;
}

.consent-modal__links a {
    color: var(--consent-green-700);
    font-size: .69rem;
    font-weight: 800;
    text-underline-offset: 3px;
}

.consent-modal__footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 22px;
}

.consent-modal__footer button {
    padding: 10px 13px;
    border-color: var(--consent-border);
    color: var(--consent-green-900);
}

.consent-modal__footer button:nth-child(2) {
    border-color: var(--consent-green-700);
    background: var(--consent-green-700);
    color: #fff;
}

.consent-modal__footer button:last-child {
    border-color: var(--consent-gold);
    background: var(--consent-gold);
    color: var(--consent-green-950);
}

.consent-toast {
    position: fixed;
    z-index: 10000;
    right: 18px;
    bottom: 18px;
    max-width: min(360px, calc(100% - 36px));
    padding: 13px 15px;
    border-radius: 13px;
    background: var(--consent-green-950);
    color: #fff;
    box-shadow: 0 18px 48px rgba(0, 24, 17, .26);
    font-size: .75rem;
    font-weight: 750;
}

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

@media (max-width: 900px) {
    .consent-banner {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .consent-banner__icon {
        width: 46px;
        height: 46px;
    }

    .consent-banner__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .consent-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: calc(100% - 20px);
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        border-radius: 18px;
    }

    .consent-banner__icon {
        display: none;
    }

    .consent-banner__actions {
        grid-template-columns: 1fr;
    }

    .consent-banner__actions button {
        width: 100%;
    }

    .consent-modal {
        align-items: end;
        padding: 0;
    }

    .consent-modal__dialog {
        max-height: 92vh;
        padding: 21px 15px calc(18px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
    }

    .consent-option {
        padding: 14px;
    }

    .consent-modal__footer {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .consent-switch > span,
    .consent-switch > span::after {
        transition: none;
    }
}
