.cookie-consent {
    --cookie-ink: #242321;
    --cookie-paper: #f0efe8;
    --cookie-green: #c9dd68;
    --cookie-green-dark: #aabd4f;
    --cookie-white: #ffffff;

    position: fixed;
    z-index: 600;
    inset-inline: 0;
    bottom: 24px;

    display: flex;
    justify-content: center;

    width: 100%;
    padding-inline: 24px;

    pointer-events: none;
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent__panel {
    position: relative;
    isolation: isolate;

    width: 100%;
    max-width: 1060px;

    overflow: hidden;

    color: var(--cookie-ink);
    background: var(--cookie-paper);

    border: 2px solid var(--cookie-ink);
    box-shadow: 10px 10px 0 var(--cookie-green);

    pointer-events: auto;

    animation: cookie-consent-enter 550ms cubic-bezier(.2, .8, .2, 1) both;
}

.cookie-consent__content,
.cookie-consent__settings {
    position: relative;
    z-index: 2;

    padding: 22px 28px 18px;
}

.cookie-consent__decoration {
    position: absolute;
    z-index: -1;
    inset: 0;

    overflow: hidden;
    pointer-events: none;
}

.cookie-consent__giant-text {
    position: absolute;
    top: 48px;
    right: -24px;

    color: var(--cookie-ink);

    font-family: var(--font-primary);
    font-size: clamp(5rem, 13vw, 10rem);
    font-weight: 700;
    line-height: .8;
    letter-spacing: -.09em;

    white-space: nowrap;
    opacity: .045;

    transform: rotate(-7deg);
    user-select: none;
}

.cookie-consent__giant-number {
    position: absolute;
    right: 24px;
    bottom: -65px;

    color: var(--cookie-green);

    font-family: var(--font-primary);
    font-size: clamp(12rem, 25vw, 22rem);
    font-weight: 700;
    line-height: .8;

    opacity: .17;
    user-select: none;
}

.cookie-consent__decoration-line {
    position: absolute;
    top: 0;
    right: 25%;

    width: 2px;
    height: 100%;

    background: var(--cookie-ink);
    opacity: .06;

    transform: rotate(18deg);
}

.cookie-consent__header,
.cookie-consent__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-consent__header {
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(36, 35, 33, .55);
}

.cookie-consent__eyebrow,
.cookie-consent__reference,
.cookie-consent__overline,
.cookie-consent__footer,
.cookie-consent__button-caption,
.cookie-consent__always-active,
.cookie-consent__switch-state {
    font-family: var(--font-secondary);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .09em;
}

.cookie-consent__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.cookie-consent__status-dot {
    width: 9px;
    height: 9px;

    background: var(--cookie-green-dark);
    border: 1px solid var(--cookie-ink);
    border-radius: 50%;

    box-shadow: 0 0 0 3px rgba(201, 221, 104, .3);
}

.cookie-consent__reference {
    color: #68665f;
}

.cookie-consent__reference span {
    margin-inline: 4px;
}

.cookie-consent__body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    align-items: center;
    gap: 32px;

    padding-block: 22px 20px;
}

.cookie-consent__copy {
    position: relative;
    z-index: 1;
}

.cookie-consent__overline {
    display: block;
    margin-bottom: 9px;

    color: #69675f;
}

.cookie-consent__title {
    display: flex;
    flex-direction: column;
    gap: 0;

    margin: 0;

    color: var(--cookie-ink);

    font-family: var(--font-primary);
    font-size: clamp(2.2rem, 4.2vw, 3.7rem);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.065em;
}

.cookie-consent__title span {
    color: var(--cookie-ink);
    -webkit-text-stroke: 1px var(--cookie-ink);
    -webkit-text-fill-color: transparent;
}

.cookie-consent__description {
    max-width: 490px;
    margin: 15px 0 0;

    color: #55534e;

    font-family: var(--font-body);
    font-size: .85rem;
    line-height: 1.6;
}

.cookie-consent__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-consent__button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 46px;
    padding: 12px 15px;

    border: 2px solid var(--cookie-ink);
    border-radius: 0;

    font-family: var(--font-secondary);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .035em;

    cursor: pointer;

    transition: transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.cookie-consent__button:focus-visible,
.cookie-consent__switch input:focus-visible + .cookie-consent__switch-track {
    outline: 3px solid var(--cookie-green-dark);
    outline-offset: 4px;
}

.cookie-consent__button--accept {
    display: block;

    min-height: 78px;
    padding: 12px 16px;

    color: var(--cookie-ink);
    background: var(--cookie-green);

    box-shadow: 5px 5px 0 var(--cookie-ink);

    text-align: left;
}

.cookie-consent__button-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cookie-consent__button-label {
    font-family: var(--font-primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.025em;
}

.cookie-consent__button-arrow {
    display: inline-block;

    font-family: var(--font-body);
    font-size: 1.8rem;
    font-weight: 400;

    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.cookie-consent__button-caption {
    display: block;
    margin-top: 4px;
    font-size: .57rem;
}

.cookie-consent__button--accept:hover {
    background: #d9ec85;
    box-shadow: 9px 9px 0 var(--cookie-ink);
    transform: translate(-3px, -3px);
}

.cookie-consent__button--accept:hover .cookie-consent__button-arrow {
    transform: translate(4px, -4px) rotate(5deg);
}

.cookie-consent__button--accept:active {
    box-shadow: 1px 1px 0 var(--cookie-ink);
    transform: translate(4px, 4px);
}

.cookie-consent__secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cookie-consent__button--reject {
    color: var(--cookie-ink);
    background: transparent;
}

.cookie-consent__button--reject:hover {
    color: var(--cookie-white);
    background: var(--cookie-ink);
}

.cookie-consent__button--configure {
    justify-content: space-between;

    color: var(--cookie-white);
    background: var(--cookie-ink);
}

.cookie-consent__button--configure span {
    font-size: 1.15rem;
    transition: transform 180ms ease;
}

.cookie-consent__button--configure:hover {
    color: var(--cookie-ink);
    background: var(--cookie-green);
}

.cookie-consent__button--configure:hover span {
    transform: translate(3px, -3px);
}

.cookie-consent__footer {
    padding-top: 12px;
    border-top: 1px solid rgba(36, 35, 33, .35);

    color: #69675f;
    font-size: .58rem;
}

.cookie-consent__footer a {
    color: var(--cookie-ink);
    font-weight: 700;
    text-decoration: none;
}

.cookie-consent__footer a:hover {
    text-decoration: underline;
}

/* Panel de preferencias */

.cookie-consent__settings {
    animation: cookie-settings-enter 300ms ease both;
}

.cookie-consent__settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 16px;
    border-bottom: 1px solid rgba(36, 35, 33, .55);
}

.cookie-consent__settings-title {
    display: flex;
    flex-direction: column;

    margin: 8px 0 0;

    color: var(--cookie-ink);

    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.06em;
}

.cookie-consent__settings-title span {
    color: transparent;
    -webkit-text-stroke: 1px var(--cookie-ink);
}

.cookie-consent__settings-number {
    color: var(--cookie-green-dark);

    font-family: var(--font-primary);
    font-size: 5rem;
    font-weight: 700;
    line-height: .8;
}

.cookie-consent__settings-description {
    max-width: 650px;
    margin: 16px 0;

    color: #55534e;
    font-size: .88rem;
    line-height: 1.6;
}

.cookie-consent__preference-list {
    display: flex;
    flex-direction: column;

    border-top: 2px solid var(--cookie-ink);
}

.cookie-consent__preference {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 17px 0;
    border-bottom: 1px solid rgba(36, 35, 33, .3);
}

.cookie-consent__preference-copy {
    max-width: 620px;
}

.cookie-consent__preference-copy h3 {
    margin: 0 0 5px;

    color: var(--cookie-ink);

    font-family: var(--font-secondary);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.cookie-consent__preference-copy p {
    margin: 0;

    color: #68665f;
    font-size: .8rem;
    line-height: 1.5;
}

.cookie-consent__always-active {
    flex-shrink: 0;

    padding: 8px 10px;

    color: var(--cookie-ink);
    background: var(--cookie-green);

    font-size: .58rem;
}

.cookie-consent__switch {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;

    cursor: pointer;
}

.cookie-consent__switch input {
    position: absolute;

    width: 1px;
    height: 1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.cookie-consent__switch-track {
    position: relative;

    display: inline-flex;
    align-items: center;

    width: 48px;
    height: 27px;
    padding: 3px;

    background: #d4d2ca;
    border: 2px solid var(--cookie-ink);

    transition: background-color 180ms ease;
}

.cookie-consent__switch-thumb {
    width: 17px;
    height: 17px;

    background: var(--cookie-ink);

    transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track {
    background: var(--cookie-green);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track .cookie-consent__switch-thumb {
    transform: translateX(19px);
}

.cookie-consent__switch-state {
    min-width: 78px;
    color: #68665f;
    font-size: .58rem;
}

.cookie-consent__settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 18px;
}

.cookie-consent__button--save {
    min-width: 220px;

    color: var(--cookie-ink);
    background: var(--cookie-green);

    box-shadow: 4px 4px 0 var(--cookie-ink);
}

.cookie-consent__button--save:hover {
    background: #d9ec85;
    box-shadow: 7px 7px 0 var(--cookie-ink);
    transform: translate(-2px, -2px);
}

.cookie-consent__button--save span {
    font-size: 1.1rem;
}

.cookie-consent__button--back {
    min-width: 110px;

    color: var(--cookie-ink);
    background: transparent;
}

.cookie-consent__button--back:hover {
    color: var(--cookie-white);
    background: var(--cookie-ink);
}

/* Animaciones */

@keyframes cookie-consent-enter {
    from {
        opacity: 0;
        transform: translateY(28px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cookie-settings-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adaptación a pantallas medianas */

@media (max-width: 768px) {
    .cookie-consent {
        bottom: 16px;
        padding-inline: 16px;
    }

    .cookie-consent__panel {
        box-shadow: 7px 7px 0 var(--cookie-green);
    }

    .cookie-consent__content,
    .cookie-consent__settings {
        padding: 19px 20px 16px;
    }

    .cookie-consent__body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-block: 20px;
    }

    .cookie-consent__description {
        max-width: 580px;
    }

    .cookie-consent__actions {
        max-width: 100%;
    }

    .cookie-consent__giant-text {
        top: 75px;
        right: -15px;
        font-size: 7rem;
    }

    .cookie-consent__giant-number {
        right: 10px;
        bottom: -35px;
        font-size: 14rem;
    }
}

/* Adaptación a móviles */

@media (max-width: 480px) {
    .cookie-consent {
        bottom: 12px;
        padding-inline: 12px;
    }

    .cookie-consent__panel {
        box-shadow: 5px 5px 0 var(--cookie-green);
    }

    .cookie-consent__content,
    .cookie-consent__settings {
        padding: 16px 15px 13px;
    }

    .cookie-consent__header {
        align-items: flex-start;
        gap: 8px;
    }

    .cookie-consent__eyebrow {
        font-size: .54rem;
    }

    .cookie-consent__reference {
        font-size: .52rem;
        text-align: right;
    }

    .cookie-consent__body {
        gap: 17px;
        padding-block: 18px;
    }

    .cookie-consent__title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

    .cookie-consent__description {
        margin-top: 12px;
        font-size: .78rem;
    }

    .cookie-consent__button--accept {
        min-height: 68px;
    }

    .cookie-consent__button-label {
        font-size: 1.15rem;
    }

    .cookie-consent__button--reject,
    .cookie-consent__button--configure {
        min-height: 43px;
        padding-inline: 8px;
        font-size: .61rem;
    }

    .cookie-consent__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;

        font-size: .54rem;
    }

    .cookie-consent__settings-title {
        font-size: 2.15rem;
    }

    .cookie-consent__settings-number {
        font-size: 3.5rem;
    }

    .cookie-consent__preference {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .cookie-consent__preference-copy h3 {
        font-size: .76rem;
    }

    .cookie-consent__preference-copy p {
        font-size: .75rem;
    }

    .cookie-consent__settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-consent__button--save,
    .cookie-consent__button--back {
        width: 100%;
    }

    .cookie-consent__giant-text {
        top: 95px;
        font-size: 5rem;
    }
}

/* Accesibilidad: reducir movimiento */

@media (prefers-reduced-motion: reduce) {
    .cookie-consent *,
    .cookie-consent *::before,
    .cookie-consent *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}