/**
 * Hurricane Newsletter Popup Styles
 * Modern popup with bottom-left image overlay
 */

/* Wrapper - Hidden by default */
.hurricane-newsletter-popup-wrapper {
    display: none;
}

.hurricane-newsletter-popup-wrapper.active {
    display: block;
}

/* Overlay Background */
.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999998;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* Popup Content Container */
.newsletter-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    width: 90%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

/* Close Button */
.newsletter-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    font-weight: 300;
}

.newsletter-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Inner Container */
.newsletter-inner {
    position: relative;
    min-height: 400px;
    display: flex;
}

/* Main Content Area */
.newsletter-main-content {
    flex: 1;
    padding: 60px 50px 50px 50px;
    z-index: 2;
    position: relative;
}

/* Heading */
.newsletter-heading {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

/* Subheading */
.newsletter-subheading {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

/* Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form-group {
    width: 100%;
}

/* Email Input */
.newsletter-email-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.newsletter-email-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

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

/* Submit Button */
.newsletter-submit-btn {
    width: 100%;
    padding: 16px 30px;
    background: #0066cc;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-submit-btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

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

.newsletter-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Privacy Text */
.newsletter-privacy {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    margin: 12px 0 0 0;
    line-height: 1.4;
}

/* Success Message */
.newsletter-success {
    text-align: center;
    padding: 40px 20px;
}

.newsletter-success .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #d1fae5;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.newsletter-success p {
    font-size: 18px;
    color: #1f2937;
    font-weight: 500;
    margin: 0;
}

/* Image Overlay - Bottom Left */
.newsletter-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35%;
    height: auto;
    z-index: 1;
    pointer-events: none;
}

.newsletter-image-overlay img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: bottom left;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .newsletter-popup-content {
        width: 95%;
        max-width: none;
    }
    
    .newsletter-main-content {
        padding: 50px 35px 40px 35px;
    }
    
    .newsletter-heading {
        font-size: 28px;
    }
    
    .newsletter-subheading {
        font-size: 15px;
    }
    
    .newsletter-image-overlay {
        width: 40%;
    }
    
    .newsletter-close-btn {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 28px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .newsletter-popup-content {
        width: 95%;
        border-radius: 12px;
    }
    
    .newsletter-inner {
        min-height: 450px;
    }
    
    .newsletter-main-content {
        padding: 45px 25px 30px 25px;
    }
    
    .newsletter-heading {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .newsletter-subheading {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .newsletter-email-input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .newsletter-submit-btn {
        padding: 14px 25px;
        font-size: 16px;
    }
    
    .newsletter-privacy {
        font-size: 12px;
    }
    
    /* Image overlay smaller on mobile */
    .newsletter-image-overlay {
        width: 45%;
        max-width: 150px;
    }
    
    .newsletter-close-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}

/* Very small mobile */
@media (max-width: 360px) {
    .newsletter-image-overlay {
        width: 50%;
        max-width: 120px;
    }
    
    .newsletter-main-content {
        padding: 40px 20px 25px 20px;
    }
}

/* Loading state */
.newsletter-form.loading .newsletter-submit-btn::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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