/* Email Gate Styles - Can be kept separate or merged with styles.css */

/* Overlay that covers entire screen */
.emailgate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* When email gate is active */
.emailgate-overlay.active {
    display: flex !important;
}

/* Modal dialog box */
.emailgate-modal {
    background: #FFFFFF;
    border-radius: 15px;
    padding: 2rem;
    padding-top: 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: emailgate-slideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes emailgate-slideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close button */
.emailgate-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.emailgate-close:hover {
    background: #ff4444;
    transform: scale(1.1);
}

.emailgate-close i {
    color: #6C757D;
    font-size: 16px;
}

.emailgate-close:hover i {
    color: white;
}

/* Header */
.emailgate-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.emailgate-header h2 {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: #0A0A0A;
    margin: 0;
    font-weight: 600;
}

/* Form styles */
.emailgate-form {
    margin: 0;
}

.emailgate-input-group {
    margin-bottom: 1rem;
}

.emailgate-label {
    display: block;
    color: #0A0A0A;
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.emailgate-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #E0E0E0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #FFFFFF;
    color: #0A0A0A;
    transition: all 0.2s ease;
    outline: none;
}

.emailgate-input:focus {
    border-color: #00D4FF;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.emailgate-input::placeholder {
    color: rgba(108, 117, 125, 0.6);
    font-size: 0.9rem;
}

/* Submit button */
.emailgate-submit {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: #0A0A0A;
    border: 2px solid #0A0A0A;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.25rem;
}

.emailgate-submit:hover:not(:disabled) {
    background: transparent;
    color: #0A0A0A;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.emailgate-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading spinner */
.emailgate-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: emailgate-spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes emailgate-spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.emailgate-error {
    color: #dc3545;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.emailgate-error.show {
    display: block;
}

@keyframes emailgate-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Hide all content when gate is active */
body.emailgate-active {
    overflow: hidden !important;
    height: 100vh !important;
}

body.emailgate-active > *:not(.emailgate-overlay) {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .emailgate-modal {
        padding: 1.5rem;
        padding-top: 2rem;
        width: 95%;
        max-width: 350px;
    }
    
    .emailgate-close {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
    }
    
    .emailgate-close i {
        font-size: 14px;
    }
    
    .emailgate-header h2 {
        font-size: 1.2rem;
    }
    
    .emailgate-input {
        padding: 0.7rem 0.9rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .emailgate-submit {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .emailgate-modal {
        padding: 1.25rem;
        padding-top: 1.75rem;
    }
    
    .emailgate-header h2 {
        font-size: 1.1rem;
    }
    
    .emailgate-label {
        font-size: 0.85rem;
    }
    
    .emailgate-input {
        padding: 0.6rem 0.8rem;
    }
    
    .emailgate-submit {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}