/* Age Verification Definitive Plugin Styles */

/* Preblock overlay styles - hidden by default, shown only via JavaScript */
#age-verification-preblock {
    position: fixed;
    z-index: 2147483647;
    inset: 0;
    background: #000000f2;
    width: 100vw;
    height: 100vh;
    display: none; /* Hidden by default - only shown when needed */
    pointer-events: all;
    transition: opacity 0.3s;
}

/* Show preblock only when explicitly activated */
#age-verification-preblock.show {
    display: block;
}

/* Ensure main content is never hidden by default */
html, body {
    height: auto !important;
    margin: 0;
    padding: 0;
}

/* Only apply body styles when popup is active (controlled by JavaScript) */

/* Popup container styles */
.age-verification-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Body states when popup is active - only applied when JavaScript adds the class */
body.age-popup-active {
    overflow: hidden !important;
}

body.age-popup-active .header-bottom.header-mobile {
    display: none !important;
}

/* Only block pointer events on elements outside the popup when popup is actually shown */
body.age-popup-active:has(.age-verification-popup[style*="flex"]) *:not(.age-verification-popup):not(.age-verification-popup *) {
    pointer-events: none !important;
    user-select: none !important;
}

/* Fallback for browsers that don't support :has() */
body.age-popup-active .age-verification-popup[style*="flex"] ~ * {
    pointer-events: none !important;
    user-select: none !important;
}

/* Popup content styles */
.age-verification-content {
    background-clip: padding-box;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 95vw;
    box-shadow: 0 2px 20px #0004;
    font-family: Arial, sans-serif;
}

/* Logo styles */
.age-verification-logo {
    width: 120px;
    aspect-ratio: 2 / 1;
    height: auto;
    max-width: 100%;
    margin-bottom: 1rem;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Title styles */
.age-verification-title {
    margin-bottom: 0.7rem;
    font-size: 32px;
    color: #222;
}

/* Badge styles */
.age-verification-badge {
    margin: 1rem 0;
}

.age-badge {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    border-radius: 50%;
    padding: 0.5rem 1rem;
    font-weight: bold;
    font-size: 1.3rem;
}

/* Text styles */
.age-verification-text {
    margin-bottom: 1.2rem;
    font-size: 16px;
    color: #444;
}

/* Action buttons styles */
.age-verification-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 8px;
    margin-top: 1.5rem;
}

.age-btn-enter,
.age-btn-exit {
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.age-btn-enter {
    background: #ff9800;
    color: #fff;
}

.age-btn-enter:hover {
    background: #e68900;
}

.age-btn-exit {
    background: #eee;
    color: #888;
}

.age-btn-exit:hover {
    background: #ddd;
    color: #555;
}

/* Help link styles */
.age-verification-help {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.age-help-link {
    color: #ff9800;
    text-decoration: underline;
}

.age-btn-enter + .age-btn-exit {
    margin-top: 10px;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
    .age-verification-content {
        width: 98vw;
        max-width: 98vw;
        padding: 1.2rem 0.5rem;
        border-radius: 8px;
        box-sizing: border-box;
    }
    
    .age-verification-popup {
        align-items: center;
        padding: 0;
    }
    
    .age-verification-logo {
        width: 60px !important;
    }
    
    .age-verification-title {
        font-size: 1.2rem;
    }
    
    .age-verification-text {
        font-size: 0.97rem;
    }
    
    .age-verification-actions {
        flex-direction: column;
        gap: 12px 0 !important;
        align-items: stretch;
        margin-top: 1rem;
    }
    
    .age-verification-actions button {
        width: 96%;
        max-width: 240px;
        margin: 0 auto;
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }
    
    .age-btn-enter + .age-btn-exit {
        margin-top: 10px !important;
    }
    
    .age-verification-help {
        font-size: 0.83rem;
        margin-top: 1.2rem;
    }
}