/**
 * Age Gate Modal Styles
 *
 * Uses WordPress FSE system styles where possible.
 * Relies on CSS custom properties for theming.
 *
 * @package AdSense_Safe_Hiding
 * @since 1.0.0
 */

/* Prevent body scroll when modal is open */
body.ash-no-scroll {
    overflow: hidden;
}

/* Overlay */
.ash-age-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: ash-fade-in 0.3s ease-out;
}

@keyframes ash-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.ash-age-gate-modal {
    background: var(--wp--preset--color--base, #ffffff);
    color: var(--wp--preset--color--contrast, #000000);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 60px 40px;
    text-align: center;
    animation: ash-slide-up 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes ash-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header - Logo Section */
.ash-age-gate-header {
    margin-bottom: 30px;
}

.ash-age-gate-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.ash-age-gate-site-name {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    letter-spacing: -0.5px;
}

/* Warning Icon (Font Awesome) */
.ash-age-gate-icon {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Title */
.ash-age-gate-title {
    font-size: 28px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* Description */
.ash-age-gate-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    margin-bottom: 30px;
}

.ash-age-gate-description p {
    margin: 0 0 1em 0;
}

.ash-age-gate-description p:last-child {
    margin-bottom: 0;
}

/* Age Requirement Box */
.ash-age-gate-requirement {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    text-align: left;
}

.ash-age-gate-requirement p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #333333;
}

.ash-age-gate-requirement strong {
    color: #667eea;
    font-weight: 600;
}

/* Buttons Container */
.ash-age-gate-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
}

/* Button Styles */
.ash-btn {
    flex: 1;
    max-width: 200px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ash-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.ash-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ash-btn-primary:hover,
.ash-btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ash-btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.ash-btn-secondary:hover,
.ash-btn-secondary:focus {
    background: #dee2e6;
    transform: translateY(-2px);
}

.ash-btn i {
    font-size: 1.1em;
}

/* Remember Me Checkbox */
.ash-age-gate-remember {
    margin-bottom: 25px;
}

.ash-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #666666;
    font-size: 14px;
    user-select: none;
}

.ash-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.ash-checkbox:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Legal Text */
.ash-age-gate-legal {
    color: #999999;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.ash-age-gate-legal a {
    color: #667eea;
    text-decoration: none;
}

.ash-age-gate-legal a:hover,
.ash-age-gate-legal a:focus {
    text-decoration: underline;
}

/* Exit Animation */
.ash-age-gate-overlay.ash-exiting {
    animation: ash-fade-out 0.3s ease-out forwards;
}

.ash-age-gate-overlay.ash-exiting .ash-age-gate-modal {
    animation: ash-slide-down 0.3s ease-out forwards;
}

@keyframes ash-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes ash-slide-down {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .ash-age-gate-modal {
        padding: 40px 30px;
        max-height: 95vh;
    }

    .ash-age-gate-site-name {
        font-size: 24px;
    }

    .ash-age-gate-title {
        font-size: 22px;
    }

    .ash-age-gate-icon {
        font-size: 48px;
    }

    .ash-age-gate-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .ash-btn {
        max-width: 100%;
        width: 100%;
    }
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .ash-age-gate-overlay {
        background: rgba(0, 0, 0, 0.95);
    }

    .ash-age-gate-modal {
        background: #1a1a1a;
        color: #ffffff;
    }

    .ash-age-gate-title,
    .ash-age-gate-requirement p {
        color: #ffffff;
    }

    .ash-age-gate-description {
        color: #cccccc;
    }

    .ash-age-gate-requirement {
        background: #2a2a2a;
        border-left-color: #667eea;
    }

    .ash-age-gate-legal {
        color: #888888;
        border-top-color: #333333;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ash-age-gate-overlay,
    .ash-age-gate-modal,
    .ash-btn {
        animation: none !important;
        transition: none !important;
    }
}

/* Print - Hide Age Gate */
@media print {
    .ash-age-gate-overlay {
        display: none !important;
    }
}
