/* === Newsletter Form Container === */
.newsletter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    max-width: 480px;
    margin: 20px auto 0;
    padding: 10px;
    position: relative;
}

/* === Input Field === */
.newsletter-input {
    flex: 1 1 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 15px;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: all 0.3s ease;
    min-width: 0;
}

.newsletter-input:focus {
    border-color: #3b82f6;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* === Button === */
.newsletter-button {
    padding: 12px 24px;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.newsletter-button:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
}

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

.newsletter-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* === Notification Styles === */
.newsletter-notification {
    position: absolute;
    bottom: -40px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    left: 0;
    right: 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.newsletter-notification.success {
    background-color: #dcfce7;
    color: #166534;
}

.newsletter-notification.error {
    background-color: #fee2e2;
    color: #991b1b;
}

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

/* === Loading Spinner === */
.newsletter-button .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* === Responsive Adjustments === */
@media (max-width: 640px) {
    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .newsletter-input,
    .newsletter-button {
        width: 100%;
    }

    .newsletter-button {
        margin-top: 6px;
    }

    .newsletter-notification {
        bottom: -60px;
    }
}
