/* When the age gate is open, defer the independent PPC login/register gate.
   This does not interfere with PPC's own trigger, redirect or account forms. */
html.advyon-agegate-required body #ppc-access-gate {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.advyon-agegate-required body {
    overflow: hidden !important;
}

.advyon-agegate-required body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    background: #fff;
}

.advyon-age-gate[hidden] {
    display: none !important;
}

.advyon-age-gate,
.advyon-age-gate * {
    box-sizing: border-box;
}

.advyon-age-gate {
    position: fixed;
    inset: 0;
    z-index: 2147483610;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    font-family: 'Archivo', sans-serif;
    color: var(--forest-green, #2e3e16);
}

.advyon-age-gate__panel {
    position: relative;
    flex: 0 0 auto;
    width: clamp(720px, 60vw, 1150px);
    min-height: min(70vh, 760px);
    max-width: 100%;
    margin: auto;
    padding: clamp(28px, 4.3vw, 80px) clamp(30px, 5vw, 96px);
    overflow: hidden;
    border: clamp(7px, .8vw, 15px) solid var(--forest-green, #2e3e16);
    border-radius: 0;
    background: var(--ivory, #f7f5e8);
    box-shadow: none;
    outline: none;
}

.advyon-age-gate__content {
    position: relative;
    z-index: 2;
}

.advyon-age-gate__eyebrow,
.advyon-age-gate__description,
.advyon-age-gate__agreement,
.advyon-age-gate__decline {
    font-family: 'Archivo', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: clamp(1.1px, .16vw, 3.2px);
    color: var(--forest-green, #2e3e16);
}

.advyon-age-gate__eyebrow {
    margin: 0 0 clamp(12px, 1.25vw, 25px);
    font-size: clamp(10px, .88vw, 16px);
    line-height: 1.4;
}

.advyon-age-gate__heading {
    margin: 0 0 clamp(11px, 1.3vw, 25px);
    font-family: 'cooper_lt_btlight', Georgia, serif;
    font-size: clamp(28px, 3vw, 58px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 0;
    text-transform: none;
    color: var(--dark-brown, #291607);
}

.advyon-age-gate__description {
    max-width: 100%;
    margin: 0 0 clamp(22px, 2.45vw, 47px);
    font-size: clamp(10px, .93vw, 17.8px);
    line-height: 1.8;
}

.advyon-age-gate__agreement {
    display: flex;
    align-items: flex-start;
    gap: clamp(12px, 1.1vw, 21px);
    max-width: 77%;
    margin: 0 0 clamp(30px, 3vw, 58px);
    cursor: pointer;
    font-size: clamp(10px, .91vw, 17.4px);
    line-height: 1.55;
}

.advyon-age-gate__agreement span {
    display: block;
    flex: 1;
}

.advyon-age-gate__checkbox {
    width: clamp(13px, 1vw, 20px);
    height: clamp(13px, 1vw, 20px);
    flex: 0 0 auto;
    margin: .28em 0 0;
    cursor: pointer;
    accent-color: var(--forest-green, #2e3e16);
}

.advyon-age-gate__checkbox:focus-visible,
.advyon-age-gate__actions button:focus-visible {
    outline: 3px solid var(--burnt-gold, #c17a19);
    outline-offset: 4px;
}

.advyon-age-gate__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(13px, 1.8vw, 35px);
}

.advyon-age-gate__actions button {
    min-width: 0;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}

.advyon-age-gate__confirm {
    padding: clamp(10px, 1.05vw, 20px) clamp(15px, 1.65vw, 32px);
    border: 2px solid #000;
    background: var(--sand-gold, #dfac62);
    font-family: 'cooper_lt_btlight', Georgia, serif;
    font-size: clamp(16px, 1.58vw, 30px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    color: var(--dark-brown, #291607);
}

.advyon-age-gate__confirm:hover:not(:disabled) {
    background: var(--forest-green, #2e3e16);
    color: #fff;
}

/* The art div also retains the theme's legacy ppc-access-gate__art class
   so images/chain.webp continues to resolve relative to the theme CSS. */
.advyon-age-gate .advyon-age-gate__art {
    position: absolute;
    right: 5%;
    bottom: 0;
    z-index: 1;
    display: block;
    flex: none;
    width: 22%;
    height: 57%;
    background-position: right bottom !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    pointer-events: none;
}

.advyon-age-gate__decline {
    position: relative;
    min-height: 42px;
    padding: 8px 0 8px clamp(15px, 2.1vw, 42px);
    border: 0;
    background: transparent;
    font-size: clamp(10px, .86vw, 16.5px);
    line-height: 1.3;
    white-space: nowrap;
}

.advyon-age-gate__decline::before {
    content: '';
    position: absolute;
    top: 9%;
    bottom: 9%;
    left: 0;
    width: 1px;
    background: var(--forest-green, #2e3e16);
}

.advyon-age-gate__decline:hover {
    background: transparent;
    color: var(--burnt-gold, #c17a19);
}

/* Disabled state retains the PDF's gold design: the checkbox is mandatory. */
.advyon-age-gate__confirm:disabled {
    opacity: .72;
    cursor: not-allowed;
}

@media (max-width: 950px) {
    .advyon-age-gate__panel {
        width: min(720px, 100%);
        min-height: auto;
        padding: 36px 42px 45px;
    }

    .advyon-age-gate__heading {
        font-size: clamp(30px, 4.6vw, 43px);
    }

    .advyon-age-gate__description {
        font-size: 12px;
    }

    .advyon-age-gate__agreement {
        font-size: 12px;
        max-width: 80%;
    }

    .advyon-age-gate .advyon-age-gate__art {
        width: 24%;
        height: 47%;
    }
}

@media (max-width: 600px) {
    .advyon-age-gate {
        padding: 12px;
    }

    .advyon-age-gate__panel {
        width: 100%;
        border-width: 7px;
        padding: 29px 24px 34px;
    }

    .advyon-age-gate__eyebrow {
        font-size: 10px;
        margin-bottom: 15px;
    }

    .advyon-age-gate__heading {
        font-size: clamp(28px, 7vw, 38px);
        margin-bottom: 18px;
    }

    .advyon-age-gate__description {
        font-size: 11px;
        line-height: 1.7;
        letter-spacing: 1.1px;
        margin-bottom: 27px;
    }

    .advyon-age-gate__agreement {
        max-width: 100%;
        font-size: 11px;
        line-height: 1.65;
        margin-bottom: 29px;
        letter-spacing: 1px;
    }

    .advyon-age-gate__checkbox {
        width: 17px;
        height: 17px;
        margin-top: 3px;
    }

    .advyon-age-gate__actions {
        align-items: stretch;
        flex-direction: column;
        gap: 11px;
    }

    .advyon-age-gate__confirm {
        width: 100%;
        padding: 14px 10px;
        font-size: clamp(17px, 4.5vw, 23px);
    }

    .advyon-age-gate__decline {
        align-self: center;
        min-height: 38px;
        padding: 9px 12px;
        font-size: 12px;
    }

    .advyon-age-gate__decline::before {
        display: none;
    }

    .advyon-age-gate .advyon-age-gate__art {
        width: 38%;
        height: 35%;
        right: -7%;
        bottom: 10%;
        opacity: .12;
    }
}

@media (prefers-reduced-motion: reduce) {
    .advyon-age-gate__actions button {
        transition: none;
    }
}
