/* ===================== Overlay ===================== */
#bmm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#bmm-popup-overlay.bmm-visible {
    opacity: 1;
}

/* ===================== Base popup ===================== */
.bmm-popup {
    position: fixed;
    background: #fff;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1000000;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bmm-popup.bmm-visible {
    opacity: 1;
}

/* ===================== Style: Centered (default) ===================== */
.bmm-popup[data-style="centered"],
.bmm-popup:not([data-style]) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    width: 90%;
}

/* ===================== Style: Bottom Banner ===================== */
.bmm-popup[data-style="banner"] {
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
    transform: translateY(100%);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    padding: 20px 30px;
}

.bmm-popup[data-style="banner"].bmm-visible {
    transform: translateY(0);
}

.bmm-popup[data-style="banner"] .bmm-popup-close {
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.bmm-popup[data-style="banner"] .bmm-popup-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-right: 40px;
}

.bmm-popup[data-style="banner"] .bmm-popup-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 0;
    flex-shrink: 0;
}

.bmm-popup[data-style="banner"] .bmm-popup-body {
    flex: 1;
    min-width: 0;
}

.bmm-popup[data-style="banner"] .bmm-popup-title {
    font-size: 1.15em;
    margin: 0 0 4px;
}

.bmm-popup[data-style="banner"] .bmm-popup-text {
    margin-bottom: 0;
    font-size: 0.9em;
}

.bmm-popup[data-style="banner"] .bmm-popup-text p {
    margin: 0;
}

.bmm-popup[data-style="banner"] .bmm-popup-cta {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===================== Style: Slide-in ===================== */
.bmm-popup[data-style="slide-in"] {
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    max-width: 360px;
    width: 90%;
}

/* ===================== Close button ===================== */
.bmm-popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 22px;
    cursor: pointer;
    color: #333;
    line-height: 28px;
    text-align: center;
    z-index: 1;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: color 0.2s ease;
}

.bmm-popup-close:hover,
.bmm-popup-close:focus,
.bmm-popup-close:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #999;
    outline: none !important;
    box-shadow: none !important;
}

/* ===================== Content ===================== */
.bmm-popup-image {
    width: 100%;
    height: auto;
    margin-top: 16px;
    margin-bottom: 16px;
    display: block;
}

.bmm-popup-title {
    margin: 0 0 8px;
    font-size: 1.4em;
    font-family: inherit;
    line-height: 1.3;
}

.bmm-popup-text {
    margin-bottom: 16px;
    color: inherit;
    line-height: 1.6;
}

.bmm-popup-text p:last-child {
    margin-bottom: 0;
}

.bmm-popup-cta {
    display: inline-block;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
    transition: filter 0.2s ease;
}

.bmm-popup-cta:hover {
    filter: brightness(0.85);
    color: #fff;
}

.bmm-popup-cta.bmm-cta-transparent {
    background: transparent !important;
    color: inherit;
    text-decoration: underline;
    padding: 10px 0;
}

.bmm-popup-cta.bmm-cta-transparent:hover {
    filter: none;
    opacity: 0.7;
    color: inherit;
}

/* ===================== Age gate & cookie notice buttons ===================== */
.bmm-popup-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}

.bmm-popup-confirm,
.bmm-popup-deny {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    padding: 12px 28px;
}

.bmm-popup-deny {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    transition: opacity 0.2s ease;
}

.bmm-popup-deny:hover {
    opacity: 0.7;
}

/* Age gate: birth-date entry fields */
.bmm-dob-fields {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.bmm-dob-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85em;
    font-weight: 700;
    text-align: left;
}

.bmm-dob-input {
    width: 80px;
    padding: 12px 8px;
    font-size: 1.15em;
    font-family: inherit;
    text-align: center;
    border: 1px solid #bbb;
    -moz-appearance: textfield;
}

.bmm-dob-input::-webkit-outer-spin-button,
.bmm-dob-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bmm-dob-year {
    width: 104px;
}

.bmm-dob-error {
    color: #b3261e;
    font-weight: 700;
    margin: 12px 0 0;
}

.bmm-dob-error[hidden] {
    display: none;
}

/* Age gate: centered content, prominent buttons */
.bmm-popup[data-type="age_gate"] {
    text-align: center;
}

.bmm-popup[data-type="age_gate"] .bmm-popup-buttons {
    justify-content: center;
    margin-top: 20px;
}

/* Birth-date entry gate */
.bmm-dob-fields {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.bmm-dob-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85em;
    font-weight: 700;
    text-align: left;
}

.bmm-dob-input {
    width: 80px;
    padding: 12px;
    font-size: 1.1em;
    text-align: center;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.bmm-dob-year {
    width: 110px;
}

.bmm-dob-error {
    color: #b3261e;
    font-weight: 700;
    margin: 12px 0 0;
}

.bmm-dob-error[hidden] {
    display: none;
}

/* Leaving-the-site notice shown before an under-21 redirect */
.bmm-popup-deny-notice {
    font-weight: 700;
    margin: 16px 0 0;
}

.bmm-popup-deny-notice[hidden] {
    display: none;
}

/* Cookie notice: compact banner, button sits in the row */
.bmm-popup[data-type="cookie_notice"] {
    padding: 16px 30px;
}

.bmm-popup[data-type="cookie_notice"] .bmm-popup-buttons {
    margin-top: 0;
    flex-shrink: 0;
}

.bmm-popup[data-type="cookie_notice"] .bmm-popup-content {
    padding-right: 0;
}

@media (max-width: 768px) {
    .bmm-popup[data-type="age_gate"] .bmm-popup-buttons {
        flex-direction: column;
    }

    .bmm-popup[data-type="age_gate"] .bmm-popup-confirm,
    .bmm-popup[data-type="age_gate"] .bmm-popup-deny {
        width: 100%;
    }
}

/* ===================== Body lock ===================== */
body.bmm-popup-open {
    overflow: hidden;
}

/* ===================== Responsive ===================== */
@media (max-width: 768px) {

    /* Centered popup: full-width on mobile */
    .bmm-popup[data-style="centered"],
    .bmm-popup:not([data-style]) {
        max-width: 95%;
        width: 95%;
        padding: 16px;
        max-height: 90vh;
    }

    .bmm-popup[data-style="centered"] .bmm-popup-title,
    .bmm-popup:not([data-style]) .bmm-popup-title {
        font-size: 1.2em;
    }

    .bmm-popup[data-style="centered"] .bmm-popup-text,
    .bmm-popup:not([data-style]) .bmm-popup-text {
        font-size: 0.9em;
    }

    /* Banner: stack vertically on mobile */
    .bmm-popup[data-style="banner"] {
        padding: 16px;
    }

    .bmm-popup[data-style="banner"] .bmm-popup-content {
        flex-direction: column;
        text-align: center;
        padding-right: 24px;
        gap: 12px;
    }

    .bmm-popup[data-style="banner"] .bmm-popup-image {
        width: 60px;
        height: 60px;
    }

    .bmm-popup[data-style="banner"] .bmm-popup-title {
        font-size: 1.05em;
    }

    .bmm-popup[data-style="banner"] .bmm-popup-text {
        font-size: 0.85em;
    }

    .bmm-popup[data-style="banner"] .bmm-popup-close {
        top: 8px;
        right: 8px;
        transform: none;
    }

    /* Slide-in: full width on mobile */
    .bmm-popup[data-style="slide-in"] {
        right: 0;
        bottom: 0;
        left: 0;
        max-width: 100%;
        width: 100%;
        padding: 16px;
    }
}
