/* Modern Newsletter Styles with Animations */

/* Newsletter Form Styling */
.modern-newsletter {
    position: relative;
    overflow: visible;
}

.newsletter-input-wrapper {
    position: relative;
    transition: all 0.3s ease;
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid transparent !important;
    color: #fff !important;
    padding-right: 60px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25), 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

.newsletter-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.9) !important;
    transform: translateX(5px);
}

.newsletter-icon {
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6) !important;
    z-index: 10;
}

.newsletter-input:focus + .newsletter-icon {
    color: #007bff !important;
    transform: scale(1.1) rotate(10deg);
}

/* Button Styling */
.newsletter-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: none !important;
    padding: 12px 30px !important;
    min-height: 50px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.newsletter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%) !important;
}

.newsletter-btn:active {
    transform: translateY(-1px);
}

.newsletter-btn::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.6s;
}

.newsletter-btn:hover::before {
    left: 100%;
}

.btn-text {
    transition: all 0.3s ease;
}

.btn-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Success/Error Message Animations */
.success-animation, .error-animation {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    margin-top: 15px;
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.success-animation {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9) 0%, rgba(25, 135, 84, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.error-animation {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(187, 44, 58, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.success-animation i, .error-animation i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-animation h4, .error-animation h4 {
    margin: 10px 0 5px 0;
    font-weight: 600;
    font-size: 1.2rem;
}

.success-animation p, .error-animation p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Loading Animation */
.quform-loading-wrap {
    display: none !important;
}

.newsletter-btn.loading .btn-text {
    opacity: 0;
}

.newsletter-btn.loading .btn-loader {
    display: block !important;
}

/* Keyframe Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(-10deg);
    }
    70% {
        transform: scale(0.9) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Focus Animation */
.newsletter-input-wrapper:focus-within {
    animation: pulse 2s infinite;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .newsletter-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .success-animation, .error-animation {
        padding: 15px;
        margin-top: 10px;
    }
    
    .success-animation i, .error-animation i {
        font-size: 2rem;
    }
    
    .newsletter-btn {
        padding: 10px 25px !important;
        min-height: 45px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .newsletter-input {
        background: rgba(255, 255, 255, 0.05) !important;
    }
    
    .newsletter-input:focus {
        background: rgba(255, 255, 255, 0.1) !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .newsletter-input {
        border: 2px solid #fff !important;
    }
    
    .newsletter-btn {
        border: 2px solid #fff !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .newsletter-input,
    .newsletter-btn,
    .newsletter-icon,
    .success-animation,
    .error-animation {
        animation: none !important;
        transition: none !important;
    }
}
