/* AI Vaping Age Gate Styles */
/* Modern, sleek design optimized for all devices */

/* Overlay and Base */
#ai-vaping-age-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai-vaping-age-gate-overlay.ai-age-gate-active {
    opacity: 1;
    visibility: visible;
}

/* Blurred Background */
.ai-age-gate-blur-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.97) 0%, rgba(0, 40, 80, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Main Container */
.ai-age-gate-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 24px;
    padding: 48px 32px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3),
                0 0 60px rgba(0, 158, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: ai-slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 158, 255, 0.2);
    overflow: hidden;
}

@keyframes ai-slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Background Decorations */
.ai-age-gate-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.15;
}

.ai-decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 158, 255, 0.15) 0%, transparent 70%);
    animation: ai-float 8s ease-in-out infinite;
}

.ai-circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.ai-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -50px;
    animation-delay: 2s;
}

.ai-circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: -75px;
    animation-delay: 4s;
}

@keyframes ai-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Content */
.ai-age-gate-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Logo */
.ai-age-gate-logo {
    margin-bottom: 32px;
    animation: ai-fadeIn 0.8s ease-out 0.2s both;
}

.ai-age-gate-logo img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.ai-age-gate-logo img:hover {
    transform: scale(1.05);
}

@keyframes ai-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Content */
.ai-age-gate-text {
    margin-bottom: 40px;
    animation: ai-fadeIn 0.8s ease-out 0.4s both;
}

.ai-age-gate-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #009EFF 0%, #0066CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-age-gate-question {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.ai-age-gate-custom-message {
    font-size: 16px;
    color: #475569;
    margin: 16px 0;
    line-height: 1.6;
}

.ai-age-gate-disclaimer {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 16px auto 0;
    max-width: 480px;
}

/* Buttons */
.ai-age-gate-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
    animation: ai-fadeIn 0.8s ease-out 0.6s both;
}

.ai-age-gate-btn {
    flex: 1;
    max-width: 220px;
    padding: 18px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-age-gate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ai-age-gate-btn:hover::before {
    width: 300px;
    height: 300px;
}

.ai-btn-yes {
    background: linear-gradient(135deg, #009EFF 0%, #0066CC 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 158, 255, 0.4);
}

.ai-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 158, 255, 0.6);
}

.ai-btn-yes:active {
    transform: translateY(0);
}

.ai-btn-no {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ai-btn-no:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.ai-btn-no:active {
    transform: translateY(0);
}

.ai-btn-icon {
    font-size: 18px;
    position: relative;
    z-index: 2;
}

.ai-btn-text {
    position: relative;
    z-index: 2;
}

/* Remember Me Checkbox */
.ai-age-gate-remember {
    margin-bottom: 24px;
    animation: ai-fadeIn 0.8s ease-out 0.8s both;
}

.ai-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #475569;
    font-size: 14px;
    transition: color 0.3s ease;
}

.ai-remember-label:hover {
    color: #1e293b;
}

.ai-remember-label input[type="checkbox"] {
    display: none;
}

.ai-checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.ai-remember-label input[type="checkbox"]:checked + .ai-checkbox-custom {
    background: linear-gradient(135deg, #009EFF 0%, #0066CC 100%);
    border-color: #009EFF;
}

.ai-remember-label input[type="checkbox"]:checked + .ai-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

/* Footer */
.ai-age-gate-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    animation: ai-fadeIn 0.8s ease-out 1s both;
}

.ai-age-gate-footer p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Loading State */
.ai-age-gate-loading {
    display: none;
    margin-top: 24px;
}

.ai-age-gate-loading.active {
    display: block;
}

.ai-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(0, 158, 255, 0.2);
    border-top-color: #009EFF;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Exit Animation */
#ai-vaping-age-gate-overlay.ai-exiting {
    animation: ai-fadeOut 0.4s ease-out forwards;
}

#ai-vaping-age-gate-overlay.ai-exiting .ai-age-gate-container {
    animation: ai-slideDown 0.4s ease-out forwards;
}

@keyframes ai-fadeOut {
    to {
        opacity: 0;
    }
}

@keyframes ai-slideDown {
    to {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
}

/* Responsive Design */

/* Tablets */
@media screen and (max-width: 768px) {
    .ai-age-gate-container {
        padding: 40px 24px;
        max-width: 500px;
    }
    
    .ai-age-gate-logo img {
        max-width: 240px;
    }
    
    .ai-age-gate-title {
        font-size: 24px;
    }
    
    .ai-age-gate-question {
        font-size: 20px;
    }
    
    .ai-age-gate-buttons {
        gap: 12px;
    }
    
    .ai-age-gate-btn {
        padding: 16px 24px;
        font-size: 15px;
    }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
    .ai-age-gate-container {
        width: 95%;
        padding: 32px 20px;
        border-radius: 20px;
    }
    
    .ai-age-gate-logo {
        margin-bottom: 24px;
    }
    
    .ai-age-gate-logo img {
        max-width: 200px;
    }
    
    .ai-age-gate-title {
        font-size: 22px;
    }
    
    .ai-age-gate-question {
        font-size: 18px;
    }
    
    .ai-age-gate-disclaimer {
        font-size: 13px;
    }
    
    .ai-age-gate-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .ai-age-gate-btn {
        max-width: 100%;
        width: 100%;
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .ai-remember-label {
        font-size: 13px;
    }
    
    .ai-age-gate-footer p {
        font-size: 12px;
        flex-direction: column;
        gap: 4px;
    }
    
    .ai-circle-1,
    .ai-circle-2,
    .ai-circle-3 {
        display: none;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 360px) {
    .ai-age-gate-container {
        padding: 24px 16px;
    }
    
    .ai-age-gate-logo img {
        max-width: 180px;
    }
    
    .ai-age-gate-title {
        font-size: 20px;
    }
    
    .ai-age-gate-question {
        font-size: 17px;
    }
}

/* Landscape Orientation on Mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .ai-age-gate-container {
        padding: 20px 24px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .ai-age-gate-logo {
        margin-bottom: 16px;
    }
    
    .ai-age-gate-logo img {
        max-width: 160px;
    }
    
    .ai-age-gate-text {
        margin-bottom: 24px;
    }
    
    .ai-age-gate-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .ai-age-gate-question {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .ai-age-gate-disclaimer {
        font-size: 13px;
    }
    
    .ai-age-gate-buttons {
        flex-direction: row;
        margin-bottom: 16px;
    }
    
    .ai-age-gate-btn {
        padding: 14px 20px;
    }
    
    .ai-age-gate-footer {
        margin-top: 16px;
        padding-top: 16px;
    }
}

/* Prevent body scroll when age gate is active */
body.ai-age-gate-locked {
    overflow: hidden !important;
    height: 100vh;
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .ai-age-gate-logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ai-decoration-circle {
        animation: none !important;
    }
}

/* Focus States for Accessibility */
.ai-age-gate-btn:focus {
    outline: 3px solid rgba(0, 158, 255, 0.5);
    outline-offset: 2px;
}

.ai-remember-label:focus-within {
    outline: 2px solid rgba(0, 158, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}
