/* email-modal.css - Place this file in your theme's assets/css/ folder */

/* Import Raleway font */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

.email-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(2px);
    font-family: 'Raleway', Arial, sans-serif;
}

.email-modal-overlay.show {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.email-modal {
    background: linear-gradient(135deg, #D7BA62 0%, #c5a855 100%);
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    font-family: 'Raleway', Arial, sans-serif;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    padding: 5px;
    line-height: 1;
    z-index: 10;
}

.modal-close:hover {
    color: #000;
}

.modal-logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-box {
    background-color: #C10B1B;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    font-family: 'Raleway', Arial, sans-serif;
}

.modal-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    margin-top: 0;
    font-family: 'Raleway', Arial, sans-serif;
}

.modal-description {
    color: #333;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 25px;
    text-align: left;
    font-family: 'Raleway', Arial, sans-serif;
}

.email-input-container {
    margin-bottom: 20px;
}

.email-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 400;
}

.email-input:focus {
    outline: none;
    border-color: #C10B1B;
}

.email-input.error {
    border-color: #e74c3c;
}

.validate-btn {
    background-color: #C10B1B;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 20px;
    transition: background-color 0.3s;
    font-family: 'Raleway', Arial, sans-serif;
}

.validate-btn:hover:not(:disabled) {
    background-color: #a00915;
}

.validate-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.opt-out-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}

.opt-out-checkbox {
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.opt-out-text {
    line-height: 1.4;
    cursor: pointer;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 400;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message {
    color: #27ae60;
    font-size: 16px;
    text-align: center;
    padding: 20px;
    display: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin-top: 20px;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* CTA Button Styles */
.cta-trigger {
    background-color: #C10B1B;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Raleway', Arial, sans-serif;
}

.cta-trigger:hover {
    background-color: #a00915;
}

/* Responsive Design */
@media (max-width: 768px) {
    .email-modal {
        padding: 30px 20px;
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }
    
    .modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .modal-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .email-input, .validate-btn {
        padding: 12px;
        font-size: 15px;
    }
    
    .logo-box {
        font-size: 16px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .email-modal {
        padding: 25px 15px;
        width: 98%;
        margin: 10px;
    }
    
    .modal-title {
        font-size: 22px;
    }
    
    .modal-description {
        font-size: 14px;
    }
    
    .opt-out-container {
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .email-modal {
        background: #f0f0f0;
        border: 2px solid #000;
    }
    
    .modal-title, .modal-description {
        color: #000;
    }
    
    .email-input {
        border: 2px solid #000;
        background: #fff;
    }
    
    .validate-btn {
        background-color: #000;
        border: 2px solid #000;
    }
}

/* Accessibility improvements */
.email-modal:focus-within {
    outline: 2px solid #C10B1B;
    outline-offset: 2px;
}

.modal-close:focus,
.email-input:focus,
.validate-btn:focus,
.opt-out-checkbox:focus {
    outline: 2px solid #C10B1B;
    outline-offset: 2px;
}

/* Animation for better UX */
.email-modal-overlay {
    transition: opacity 0.3s ease;
}

.email-modal-overlay:not(.show) {
    opacity: 0;
    pointer-events: none;
}

/* Print styles */
@media print {
    .email-modal-overlay {
        display: none !important;
    }
}