/* Newsletter Subscription Popup Styles */

/* Overlay */
.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.newsletter-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container - Enhanced with cosmetics image */
.newsletter-popup {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s ease;
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    min-height: 400px;
}

.newsletter-popup-overlay.active .newsletter-popup {
    transform: scale(1) translateY(0);
}

/* Animation Keyframes */
@keyframes slideInUp {
    0% {
        transform: scale(0.8) translateY(60px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Cosmetics Background Section */
.newsletter-popup-image {
    flex: 1;
    background-image: url('https://vojia.eu/wp-content/uploads/2025/08/beauty-cosmetics-arrangement.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 20px 0 0 20px;
}

.newsletter-popup-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(44, 62, 80, 0.6) 100%);
    border-radius: 20px 0 0 20px;
}

/* Close Button */
.newsletter-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.newsletter-popup-close:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}

/* Content Section */
.newsletter-popup-content {
    flex: 1;
    padding: 40px 35px;
    text-align: center;
    /* Use theme's primary background color instead of white */
    background: var(--ast-global-color-5, white);
    border-radius: 0 20px 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.newsletter-popup-icon {
    width: 60px;
    height: 60px;
    background: #2c3e50; /* Dark background instead of purple */
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    animation: pulse 2s infinite;
}

.newsletter-popup-title {
    font-size: 26px;
    font-weight: 700;
    /* Force black text with !important */
    color: #000000 !important;
    opacity: 1 !important;
    margin-bottom: 10px;
    line-height: 1.3;
}

.newsletter-popup-subtitle {
    font-size: 16px;
    /* Force black text with !important */
    color: #000000 !important;
    opacity: 1 !important;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Form */
.newsletter-popup-form {
    margin-bottom: 20px;
}

.newsletter-input-group {
    position: relative;
    margin-bottom: 20px;
}

.newsletter-email-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.newsletter-email-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.newsletter-email-input::placeholder {
    color: #adb5bd;
}

/* Submit Button - Inherits theme's button/accent colors */
.newsletter-submit-btn {
    width: 100%;
    padding: 16px 30px;
    /* Use theme's button/accent color - fallback to dark if no theme color */
    background: var(--ast-global-color-0, #2c3e50);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.newsletter-submit-btn:hover {
    /* Slightly darker version of theme color on hover */
    background: var(--ast-global-color-1, #34495e);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.newsletter-submit-btn:active {
    transform: translateY(0);
}

.newsletter-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.newsletter-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.newsletter-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.newsletter-message.show {
    opacity: 1;
    transform: translateY(0);
}

.newsletter-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.newsletter-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Success Icon */
.newsletter-success-icon {
    color: #28a745;
    font-size: 50px;
    margin-bottom: 15px;
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Clickable Subscribe Link - Match exact footer link colors */
.newsletter-subscribe-link {
    /* Exact same color as footer links */
    color: rgb(56, 157, 235) !important;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newsletter-subscribe-link:hover {
    /* Same color on hover as footer links */
    color: rgb(56, 157, 235) !important;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .newsletter-popup {
        margin: 20px;
        border-radius: 15px;
        flex-direction: column;
        max-width: 90%;
        min-height: auto;
    }
    
    .newsletter-popup-image {
        height: 150px;
        border-radius: 15px 15px 0 0;
    }
    
    .newsletter-popup-image::before {
        border-radius: 15px 15px 0 0;
    }
    
    .newsletter-popup-content {
        padding: 30px 25px;
        border-radius: 0 0 15px 15px;
    }
    
    .newsletter-popup-title {
        font-size: 22px;
    }
    
    .newsletter-popup-subtitle {
        font-size: 14px;
    }
    
    .newsletter-email-input,
    .newsletter-submit-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .newsletter-popup {
        width: 95%;
        margin: 15px;
    }
    
    .newsletter-popup-image {
        height: 120px;
    }
    
    .newsletter-popup-content {
        padding: 25px 20px;
    }
    
    .newsletter-popup-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .newsletter-popup-title {
        font-size: 20px;
    }
}

/* Desktop enhancements */
@media (min-width: 769px) {
    .newsletter-popup-image {
        min-width: 280px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .newsletter-popup {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .newsletter-popup-title {
        color: #ecf0f1;
    }
    
    .newsletter-popup-subtitle {
        color: #bdc3c7;
    }
    
    .newsletter-email-input {
        background: #34495e;
        color: #ecf0f1;
        border-color: #4a5f7a;
    }
    
    .newsletter-email-input:focus {
        background: #3d566e;
        border-color: #667eea;
    }
    
    .newsletter-popup-close {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .newsletter-popup-close:hover {
        background: #e74c3c;
        color: white;
    }
}