.bdv-age-gate {
    position: fixed;
    inset: 0;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.85);
    
    /* Oculto por defecto, mostrado por JS */
    display: none; 
    
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    padding: 24px;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Nueva clase para mostrarlo vía JS */
.bdv-age-gate.is-visible {
    display: flex !important;
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

/* Cuando se oculta */
.bdv-age-gate[style*="visibility: hidden"],
.bdv-age-gate[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ocultar contenido si el wrapper está oculto */
.bdv-age-gate:not(.is-visible) .bdv-age-gate__content {
    display: none !important;
}

.bdv-age-gate__content {
    background: #ffffff;
    color: #333333;
    width: min(500px, 92vw);
    border-radius: 10px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    font-family: inherit;
    pointer-events: all;
    z-index: 1;
    border: 1px solid #e0e0e0;
}

.bdv-age-gate__logo {
    margin-bottom: 16px;
}

.bdv-age-gate__logo img {
    max-width: 160px;
    height: auto;
}

.bdv-age-gate__title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    line-height: 1.3;
}

.bdv-age-gate__subtitle {
    margin: 0 0 20px;
    font-size: 16px;
    color: #666666;
    line-height: 1.5;
}

.bdv-age-gate__message {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #777777;
}

.bdv-age-gate__message p {
    margin: 0 0 12px;
    color: #777777;
}

.bdv-age-gate__actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.bdv-age-gate__btn {
    width: 100%;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.bdv-age-gate__btn--primary {
    background: rgb(251, 107, 5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(251, 107, 5, 0.3);
}

.bdv-age-gate__btn--primary:hover,
.bdv-age-gate__btn--primary:focus {
    background: rgb(231, 97, 5);
    box-shadow: 0 6px 20px rgba(251, 107, 5, 0.4);
    transform: translateY(-2px);
}

.bdv-age-gate__btn--ghost {
    background: transparent;
    color: #666666;
    border: 2px solid #e0e0e0;
}

.bdv-age-gate__btn--ghost:hover,
.bdv-age-gate__btn--ghost:focus {
    background: #f7f7f7;
    border-color: #cccccc;
    color: #333333;
}

.bdv-age-gate__form {
    display: none; /* Fallback sin JS */
}

.bdv-age-gate__fallback {
    background: rgb(251, 107, 5);
    border: none;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

body.bdv-age-gate-blocked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Asegurar que el age gate esté por encima de todo */
.bdv-age-gate {
    position: fixed !important;
}

/* Forzar centrado perfecto */
.bdv-age-gate.is-visible {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (min-width: 640px) {
    .bdv-age-gate__actions {
        flex-direction: row;
    }

    .bdv-age-gate__btn {
        width: auto;
        flex: 1 1 auto;
    }
}
