/**
 * WP PopFlow Styles
 * Version: 2.0
 */

/* Popup Container - Enhanced */
.wp-popflow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Popup Content - Modern Design */
.wp-popflow-popup {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 520px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: popflowFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Close button - Enhanced */
.wp-popflow-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wp-popflow-close:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.wp-popflow-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Email form styles - Enhanced Modern Design */
.wp-popflow-email-form {
    margin-top: 25px;
    padding: 25px 20px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.wp-popflow-email-form::before {
    content: '📧';
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.wp-popflow-form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: stretch;
}

.wp-popflow-email-form input[type="email"] {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    color: #495057;
}

.wp-popflow-email-form input[type="email"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.wp-popflow-email-form input[type="email"]::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.wp-popflow-submit {
    padding: 16px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.wp-popflow-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.wp-popflow-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.wp-popflow-submit:hover::before {
    left: 100%;
}

.wp-popflow-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.wp-popflow-submit:disabled {
    background: linear-gradient(135deg, #adb5bd 0%, #868e96 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wp-popflow-submit:disabled::before {
    display: none;
}

.wp-popflow-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    animation: messageSlideIn 0.3s ease-out;
}

.wp-popflow-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wp-popflow-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Responsive email form - Enhanced */
@media (max-width: 480px) {
    .wp-popflow-form-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .wp-popflow-email-form input[type="email"],
    .wp-popflow-submit {
        width: 100%;
        padding: 18px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .wp-popflow-email-form {
        padding: 20px 15px 15px;
        margin-top: 20px;
    }
    
    .wp-popflow-email-form::before {
        left: 15px;
    }
}

/* Content Area - Enhanced Typography */
.wp-popflow-content {
    margin-right: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-popflow-content h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #212529;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wp-popflow-content p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 16px;
}

.wp-popflow-content ul {
    color: #495057;
    line-height: 1.6;
}

.wp-popflow-content li {
    margin-bottom: 8px;
    font-size: 15px;
}

.wp-popflow-content strong {
    color: #212529;
    font-weight: 600;
}

/* Enhanced Animation */
@keyframes popflowFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02) translateY(-5px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Responsive - Enhanced */
@media (max-width: 768px) {
    .wp-popflow-popup {
        margin: 20px;
        padding: 30px 25px;
        border-radius: 16px;
        max-width: 95%;
    }
    
    .wp-popflow-content {
        margin-right: 30px;
    }
    
    .wp-popflow-content h2 {
        font-size: 24px;
    }
    
    .wp-popflow-close {
        top: 15px;
        right: 20px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wp-popflow-popup {
        margin: 15px;
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .wp-popflow-content {
        margin-right: 25px;
    }
    
    .wp-popflow-content h2 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .wp-popflow-content p {
        font-size: 15px;
    }
    
    .wp-popflow-close {
        top: 12px;
        right: 15px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}