
/* ========================================
   NEWSLETTER & OPTIN SYSTEM - CSS
   ======================================== */

/* 1. STICKY BAR */
.aipe-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    z-index: 9999;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease;
}

.aipe-sticky-bar.aipe-sticky-top {
    top: 0;
}

.aipe-sticky-bar.aipe-sticky-bottom {
    bottom: 0;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.aipe-sticky-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.aipe-sticky-bar-heading {
    font-weight: 600;
    font-size: 1.1rem;
}

.aipe-sticky-bar .aipe-newsletter-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 600px;
}

.aipe-sticky-bar input {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
}

.aipe-sticky-bar input[type="text"] {
    flex: 0 0 150px;
}

.aipe-sticky-bar input[type="email"] {
    flex: 1;
}

.aipe-sticky-bar button[type="submit"] {
    background: #fff;
    color: #667eea;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.aipe-sticky-bar button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.aipe-sticky-bar-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.aipe-sticky-bar-close:hover {
    opacity: 1;
}

/* 2. POPUP */
.aipe-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.aipe-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.aipe-popup-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

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

.aipe-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.aipe-popup-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.aipe-popup-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    color: #0f172a;
}

.aipe-popup-header p {
    margin: 0 0 1.5rem 0;
    color: #64748b;
    line-height: 1.6;
}

.aipe-popup .aipe-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aipe-form-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.aipe-form-field:focus-within {
    background: white;
    border-color: #2563eb;
}

.aipe-form-field label {
    font-size: 1.25rem;
    margin: 0;
}

.aipe-form-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 1rem;
    outline: none;
}

.aipe-form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.aipe-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.aipe-form-checkbox label {
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    margin: 0;
}

.aipe-submit-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.aipe-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.aipe-popup-footer {
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 1rem 0 0 0;
}

/* 3. FORM MESSAGES */
.aipe-form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

.aipe-form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.aipe-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* 4. MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .aipe-sticky-bar-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .aipe-sticky-bar .aipe-newsletter-form {
        width: 100%;
        max-width: none;
    }
    
    .aipe-sticky-bar input[type="text"],
    .aipe-sticky-bar input[type="email"] {
        flex: 1;
        min-width: 0;
    }
    
    .aipe-sticky-bar button[type="submit"] {
        flex-shrink: 0;
    }
    
    .aipe-popup-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .aipe-popup-header h3 {
        font-size: 1.5rem;
    }
}

/* 5. DARK MODE SUPPORT */
.dark-mode .aipe-popup-content {
    background: #0f172a;
    border: 1px solid #334155;
}

.dark-mode .aipe-popup-header h3 {
    color: #f1f5f9;
}

.dark-mode .aipe-popup-header p {
    color: #cbd5e1;
}

.dark-mode .aipe-form-field {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .aipe-form-field:focus-within {
    background: #0f172a;
    border-color: #3b82f6;
}

.dark-mode .aipe-form-field input {
    color: #f1f5f9;
}

.dark-mode .aipe-form-checkbox label {
    color: #cbd5e1;
}

.dark-mode .aipe-popup-footer {
    color: #64748b;
}

.dark-mode .aipe-popup-close {
    color: #cbd5e1;
}

.dark-mode .aipe-popup-close:hover {
    background: #1e293b;
    color: #f1f5f9;
}

/* 6. CONFIRMATION/UNSUBSCRIBE MESSAGES */
.newsletter-message {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.newsletter-message.success {
    background: #dcfce7;
    border-color: #86efac;
}

.newsletter-message h2 {
    margin: 0 0 1rem 0;
    color: #0f172a;
}

.newsletter-message p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.dark-mode .newsletter-message {
    background: #0f172a;
    border-color: #334155;
}

.dark-mode .newsletter-message h2 {
    color: #f1f5f9;
}

.dark-mode .newsletter-message p {
    color: #cbd5e1;
}
