/**
 * Email Capture Form Styles
 * Reusable component for capturing emails across the application
 */

/* Email Capture Overlay */
.sfpe-email-capture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: captureOverlayFadeIn 0.3s ease;
}

@keyframes captureOverlayFadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(15px);
    }
}

.sfpe-email-capture-container {
    background: linear-gradient(135deg, #1a2332 0%, #2a3f52 50%, #344a5f 100%);
    border: 2px solid #6cffc4;
    border-radius: 24px;
    padding: 48px;
    max-width: 520px;
    width: 90%;
    box-shadow: 
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(108, 255, 196, 0.15),
        0 0 80px rgba(108, 255, 196, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: captureContainerSlideUp 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Add subtle gradient overlay */
.sfpe-email-capture-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(108, 255, 196, 0.1), transparent);
    pointer-events: none;
}

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

.sfpe-email-capture-header {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
}

.sfpe-email-capture-header h3 {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sfpe-email-capture-header p {
    color: #b8d4e8;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

/* Email Capture Form */
.sfpe-email-capture-form {
    margin-top: 32px;
}

.sfpe-email-capture-form .sfpe-form-group {
    margin-bottom: 24px;
}

.sfpe-email-capture-form .sfpe-form-group label {
    display: block;
    color: #6cffc4;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.sfpe-email-capture-form .sfpe-email-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(108, 255, 196, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 17px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sfpe-email-capture-form .sfpe-email-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sfpe-email-capture-form .sfpe-email-input:focus {
    outline: none;
    border-color: #6cffc4;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 0 0 4px rgba(108, 255, 196, 0.1),
        0 0 24px rgba(108, 255, 196, 0.3);
}

.sfpe-email-capture-form .sfpe-email-input.error {
    border-color: #ff6b6b;
    animation: inputShake 0.3s ease;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.sfpe-email-capture-form .sfpe-email-error {
    display: block;
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 6px;
    min-height: 20px;
    font-weight: 500;
}

/* Checkbox Group */
.sfpe-email-capture-form .sfpe-checkbox-group {
    margin-bottom: 32px;
}

.sfpe-email-capture-form .sfpe-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #e0ecf4;
    font-size: 15px;
    font-weight: 400;
}

.sfpe-email-capture-form .sfpe-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Form Actions */
.sfpe-email-capture-form .sfpe-form-actions {
    display: flex;
    gap: 16px;
    margin-top: 36px;
}

.sfpe-email-capture-form .sfpe-submit-btn {
    flex: 1.5;
    padding: 16px 28px;
    background: linear-gradient(135deg, #6cffc4 0%, #4fb39c 100%);
    color: #0a1f23;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 4px 12px rgba(108, 255, 196, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.sfpe-email-capture-form .sfpe-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(108, 255, 196, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.sfpe-email-capture-form .sfpe-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.sfpe-email-capture-form .sfpe-cancel-btn {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    color: #b8d4e8;
    border: 2px solid rgba(184, 212, 232, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sfpe-email-capture-form .sfpe-cancel-btn:hover {
    border-color: rgba(184, 212, 232, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Form Footer */
.sfpe-email-capture-container .sfpe-form-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(108, 255, 196, 0.1);
}

.sfpe-email-capture-container .sfpe-form-footer p {
    color: #8fb5ce;
    font-size: 14px;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Responsive Design */
@media (max-width: 540px) {
    .sfpe-email-capture-container {
        padding: 36px 24px;
        width: 95%;
    }
    
    .sfpe-email-capture-header h3 {
        font-size: 26px;
    }
    
    .sfpe-email-capture-header p {
        font-size: 16px;
    }
    
    .sfpe-email-capture-form .sfpe-form-actions {
        flex-direction: column;
    }
    
    .sfpe-email-capture-form .sfpe-submit-btn,
    .sfpe-email-capture-form .sfpe-cancel-btn {
        width: 100%;
    }
    
    .sfpe-email-capture-form .sfpe-cancel-btn {
        order: 2;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .sfpe-email-capture-container {
        max-width: 480px;
    }
}

/* Animation for form elements */
.sfpe-email-capture-form > * {
    animation: formElementFadeIn 0.5s ease forwards;
    opacity: 0;
}

.sfpe-email-capture-form > *:nth-child(1) { animation-delay: 0.1s; }
.sfpe-email-capture-form > *:nth-child(2) { animation-delay: 0.2s; }
.sfpe-email-capture-form > *:nth-child(3) { animation-delay: 0.3s; }

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