/**
 * Email Newsletter Optin Styles
 * 
 * Simple, clean styling for the footer email capture form
 */

/* Hide form when user has already signed up */
.email-optin-hidden #email-optin-footer {
    display: none !important;
}

/* Ensure optin is visible by default */
.email-optin-footer {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Main Container - Integrated with footer */
.email-optin-footer {
    background: #494949; /* Slightly lighter than footer background */
    padding: 40px 20px;
    border-bottom: none;
    margin: 0;
}

.email-optin-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Typography */
.email-optin-heading {
    font-family: 'Aleo', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.email-optin-subheading {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    color: #cccccc;
    margin: 0 0 25px 0;
}

/* Form Styles */
.email-optin-form {
    margin: 0 auto;
}

.email-form-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.email-input {
    flex: 1;
    max-width: 400px;
    padding: 12px 15px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

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

.email-form-row.focused .email-input {
    border-color: #007b98;
}

/* Submit Button */
.email-submit-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    background: #f6b402;
    color: #323710;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.email-submit-btn:hover:not(:disabled) {
    background: #e5a500;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(246, 180, 2, 0.3);
}

.email-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Newsletter Checkbox */
.email-form-options {
    margin-bottom: 10px;
}

.newsletter-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: #cccccc;
}

.newsletter-checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    transform: scale(1.1);
}

.newsletter-checkbox:hover {
    color: #ffffff;
}

/* Privacy Text */
.privacy-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    color: #aaaaaa;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Success and Error Messages */
.email-optin-success,
.email-optin-error {
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.email-optin-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.success-message {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    color: #155724;
    margin: 0;
    font-weight: 600;
}

.email-optin-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.error-message {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #721c24;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .email-optin-footer {
        padding: 30px 15px;
    }
    
    .email-optin-heading {
        font-size: 1.5rem;
    }
    
    .email-optin-subheading {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .email-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .email-input {
        width: 100%;
        max-width: none;
    }
    
    .email-submit-btn {
        width: 100%;
        max-width: 400px;
    }
    
    .newsletter-checkbox {
        font-size: 0.9rem;
    }
    
    .privacy-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .email-optin-heading {
        font-size: 1.3rem;
    }
    
    .email-optin-subheading {
        font-size: 0.95rem;
    }
    
    .email-input,
    .email-submit-btn {
        font-size: 0.95rem;
    }
}

/* Animation for form replacement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-optin-success,
.email-optin-error {
    animation: fadeInUp 0.3s ease-out;
}

/* Integration with existing theme footer */
.site-footer {
    margin-top: 0;
    padding-top: 0; /* Remove top padding to eliminate gap */
}

.site-footer .container {
    padding-top: 30px;
}

/* Ensure smooth transition between email optin and footer content */
.site-footer .email-optin-footer {
    margin-bottom: 0;
}

/* The footer retains its original dark background from style.css */
/* Email optin section has cream background, rest of footer has dark brown */