/**
 * RumChata Age Gate overrides
 */

/* -------------------------------------------------------------------------- */
/* Restricted state: hide site chrome                                         */
/* -------------------------------------------------------------------------- */

body.agegate-page .navbar,
body.age-gate-page .navbar,
body.agegate-page footer,
body.age-gate-page footer,
body.age-restriction .navbar,
body.age-restriction footer,
body.age-restriction main,
body.age-restriction aside,
body.age-restriction .site-main,
body.age-restriction #main,
body.age-restriction .reviews,
body.age-restriction .section-home,
body.age-restriction > div:not(.age-gate__wrapper):not(.age-gate):not(#page):not(.overlay-content):not(.age-gate-custom):not(.legal-modal-overlay):not(#search-content) {
    display: none !important;
}

body.age-restriction #search-content {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

body.age-restriction {
    overflow: hidden !important;
}

body.age-restriction .legal-modal-overlay {
    display: flex !important;
    z-index: 100001 !important;
}

body.age-restriction .age-gate__wrapper {
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    padding: 0;
    background: transparent;
}

body.age-restriction .age-gate__background-color,
body.age-restriction .age-gate__background {
    display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Full-bleed background + right panel layout                                 */
/* -------------------------------------------------------------------------- */

.age-gate {
    --ag-form-max-width: none !important;
    --ag-form-border: 0 !important;
    --ag-form-padding: 0 !important;
    --ag-form-margin: 0 !important;
    --ag-input-background-color: #baab1e !important;
    --ag-input-border: none !important;
    --ag-input-radius: 0 !important;
    --ag-input-border-width: 0 !important;
    --ag-input-color: #ffffff !important;
    --ag-form-max-height: none !important;
    max-height: none !important;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #123f3b;
}

#barefoot-age-gate.rum-age-gate {
    align-items: center;
    background-color: #f5efe2;
    background-image: url("../assets/img/age-gate-banner.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding: clamp(24px, 6vw, 80px);
    width: 100%;
}

.rum-age-gate__panel {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2.2vw, 24px);
    grid-column: 2;
    justify-self: start;
    margin-left: clamp(72px, 11vw, 148px);
    max-width: 100%;
    width: min(520px, 100%);
}

/* -------------------------------------------------------------------------- */
/* Headline                                                                   */
/* -------------------------------------------------------------------------- */

body.age-restriction .rum-age-gate__headline,
body.age-restriction .rum-age-gate .title,
body.age-restriction #barefoot-age-gate .rum-age-gate__headline {
    align-items: center;
    color: #123f3b !important;
    display: flex;
    flex-direction: column;
    font-family: "Heatrix", "League Spartan", "Helvetica Neue", sans-serif !important;
    font-size: clamp(4rem, 7.5vw, 112px);
    font-style: normal;
    font-weight: 400 !important;
    letter-spacing: -0.01em !important;
    line-height: 0.96 !important;
    margin: 0;
    text-transform: uppercase !important;
    width: 100%;
}

body.age-restriction .rum-age-gate__headline-line {
    display: block;
    max-width: 100%;
    text-align: center;
    white-space: nowrap;
    width: max-content;
}

/* -------------------------------------------------------------------------- */
/* Form                                                                       */
/* -------------------------------------------------------------------------- */

.rum-age-gate__form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: clamp(20px, 3vw, 36px) 0 0;
    max-width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    width: 403.5px;
}

.rum-age-gate__dob {
    margin: 0;
    max-width: 100%;
    width: 100%;
}

.rum-age-gate__fields,
.age-gate__form-elements.rum-age-gate__fields {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    height: auto;
    list-style: none;
    margin: 0;
    max-width: 363px;
    padding: 0;
    padding-left: 40.5px;
    width: 363px;
}

.rum-age-gate__field,
.age-gate__form-section.rum-age-gate__field {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    margin: 0;
    min-height: 51px;
    padding: 0;
    position: static;
}

.rum-age-gate__field:has(.age-gate__input--month),
.rum-age-gate__field:has(.age-gate__input--day) {
    width: 88px;
}

.rum-age-gate__field:has(.age-gate__input--year) {
    width: 155px;
}

.rum-age-gate .age-gate__input {
    appearance: none;
    background-color: #baab1e;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    color: #ffffff;
    font-family: "League Spartan", "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 600;
    height: 32px;
    line-height: 32px;
    margin: 0;
    min-height: 32px;
    min-width: 0;
    padding: 0 6px;
    text-align: center;
    width: 100%;
}

.rum-age-gate .age-gate__input::placeholder {
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
}

.rum-age-gate .age-gate__label {
    box-sizing: border-box;
    color: #123f3b;
    font-family: "museo-sans-condensed", var(--rum-font-header), "League Spartan", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    height: 15px;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/* Submit + errors                                                            */
/* -------------------------------------------------------------------------- */

.rum-age-gate__submit-wrap {
    margin: 16px auto 0;
    position: static;
    width: 100px;
}

.rum-age-gate__submit,
.age-gate__button.rum-age-gate__submit {
    background-color: #123f3b;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    cursor: pointer;
    display: block;
    font-family: "League Spartan", "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 700;
    height: 32px;
    letter-spacing: 0.12em;
    line-height: 32px;
    margin: 0;
    padding: 0;
    text-align: center;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 100px;
}

.rum-age-gate__submit:hover,
.rum-age-gate__submit:focus,
.age-gate__button.rum-age-gate__submit:hover,
.age-gate__button.rum-age-gate__submit:focus {
    background-color: #0f3f3c;
    color: #ffffff;
}

.rum-age-gate__error-wrap {
    margin: 0;
    max-width: 100%;
    width: 100%;
}

.rum-age-gate__error-wrap:has(.age-gate__error) {
    margin-top: 8px;
}

.rum-age-gate__errors,
.age-gate__errors.rum-age-gate__errors {
    margin: 0;
    text-align: center;
}

.rum-age-gate .age-gate__error {
    color: #c0392b;
    font-size: 0.875rem;
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Legal line                                                                 */
/* -------------------------------------------------------------------------- */

.rum-age-gate .age-gate__additional-information {
    margin: clamp(16px, 2vw, 20px) auto 0;
    max-width: 403.5px;
    text-align: center;
    width: 100%;
}

.rum-age-gate .age-gate__additional-information p {
    color: #123f3b;
    font-family: "League Spartan", "Helvetica Neue", sans-serif;
    font-size: clamp(0.7rem, 1.4vw, 0.8125rem);
    line-height: 1.45;
    margin: 0;
}

.rum-age-gate .age-gate__additional-information a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: currentColor;
}

.rum-age-gate__legal {
    color: #123f3b;
    font-family: "League Spartan", "Helvetica Neue", sans-serif;
    font-size: clamp(0.7rem, 1.4vw, 0.8125rem);
    line-height: 1.45;
    margin: 0;
    max-width: 403.5px;
    text-align: center;
    width: 100%;
}

.rum-age-gate__legal a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: currentColor;
}

/* -------------------------------------------------------------------------- */
/* Mobile                                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    #barefoot-age-gate.rum-age-gate {
        align-items: flex-end;
        background-position: center top;
        display: flex;
        grid-template-columns: none;
        justify-content: center;
        padding: clamp(20px, 5vw, 32px);
    }

    .rum-age-gate__panel {
        align-items: center;
        grid-column: auto;
        justify-self: auto;
        margin-left: 0;
        width: min(100%, 360px);
    }

    body.age-restriction .rum-age-gate__headline,
    body.age-restriction .rum-age-gate .title,
    body.age-restriction #barefoot-age-gate .rum-age-gate__headline {
        font-size: clamp(3rem, 13vw, 112px);
        letter-spacing: -0.01em !important;
        line-height: 0.96 !important;
    }

    .rum-age-gate__form,
    .rum-age-gate__dob,
    .rum-age-gate__fields,
    .age-gate__form-elements.rum-age-gate__fields {
        max-width: 403.5px;
        width: 100%;
    }

    .rum-age-gate__fields,
    .age-gate__form-elements.rum-age-gate__fields {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-left: auto;
        margin-right: auto;
        max-width: 363px;
        padding-left: 0;
        width: 363px;
    }

    .rum-age-gate__field:has(.age-gate__input--month),
    .rum-age-gate__field:has(.age-gate__input--day) {
        flex: 0 0 88px;
        width: 88px;
    }

    .rum-age-gate__field:has(.age-gate__input--year) {
        flex: 0 0 155px;
        width: 155px;
    }

    .rum-age-gate .age-gate__input {
        height: 32px;
        min-height: 32px;
    }

    .rum-age-gate__submit-wrap {
        margin: 16px auto 0;
    }

    .rum-age-gate .age-gate__additional-information {
        max-width: 100%;
    }

    .rum-age-gate__legal {
        max-width: 100%;
    }
}
