/* VWA Newsletter Plugin - Scoped CSS */

.vwa-newsletter-form h3 {
    margin-bottom: 10px;
    font-size: 24px;
}

.vwa-newsletter-form p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Alert Messages */
.vwa-newsletter-form .vwa-alert {
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.vwa-newsletter-form .vwa-alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.vwa-newsletter-form .vwa-alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Form Fields with Material Design Style */
.vwa-newsletter-form .form-field {
    position: relative;
    margin-bottom: 25px;
}

.vwa-newsletter-form .form-field__control {
    position: relative;
}

.vwa-newsletter-form .form-field__input {
    width: 100%;
    padding: 12px 16px 12px 16px;
    border: 1px solid #D1D5DB;
    background: transparent;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.vwa-newsletter-form .form-field__input:focus {
    border-color: #007cba;
}

.vwa-newsletter-form .form-field__label {
    font-size: 12px;
    font-weight: 600;
}

.vwa-newsletter-form .form-field__control.focused .form-field__label,
.vwa-newsletter-form .form-field__input:focus + .form-field__label,
.vwa-newsletter-form .form-field__input:not(:placeholder-shown) + .form-field__label {
    top: -10px;
    font-size: 12px;
    color: #007cba;
}

.vwa-newsletter-form .mandatory {
    color: #dc3545;
}

/* Select Styling */
.vwa-newsletter-form select.form-field__input {
    padding: 12px 16px;
    border-radius: 3px;
    cursor: pointer;
}

/* Newsletter Lists Container */
.vwa-newsletter-form .newsletter-lists-container {
    margin: 30px 0;
}

.vwa-newsletter-form .card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.vwa-newsletter-form .card.border {
    border-color: #007cba;
}

.vwa-newsletter-form .card-body {
    padding: 20px;
}

.vwa-newsletter-form .form-check {
    margin: 10px 0;
}

.vwa-newsletter-form .form-check-input {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.vwa-newsletter-form .form-check-label {
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
}

/* Form Group */
.vwa-newsletter-form .form-group {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.vwa-newsletter-form .form-group strong {
    color: #333;
    line-height: 1.6;
}

/* Button Styling */
.vwa-newsletter-form .btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.vwa-newsletter-form .btn-primary {
    background-color: #007cba;
    color: white;
}

.vwa-newsletter-form .btn-primary:hover:not(:disabled) {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.vwa-newsletter-form .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.vwa-newsletter-form .btn-secondary:hover:not(:disabled) {
    background-color: #545b62;
}

.vwa-newsletter-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Utility Classes */
.vwa-newsletter-form .mb-5 {
    margin-bottom: 30px;
}

.vwa-newsletter-form .mt-3 {
    margin-top: 15px;
}

.vwa-newsletter-form .mb-0 {
    margin-bottom: 0;
}

.vwa-newsletter-form .mt-2 {
    margin-top: 10px;
}

.vwa-newsletter-form .mb-2 {
    margin-bottom: 10px;
}


/* Newsletter Unsubscribe Form */
.vwa-newsletter-form.vwa-newsletter-unsubscribe {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vwa-newsletter-form.vwa-newsletter-unsubscribe h3 {
    color: #333;
    margin-bottom: 10px;
}

.vwa-newsletter-form.vwa-newsletter-unsubscribe h4 {
    color: #007cba;
    margin: 20px 0 15px 0;
}

.vwa-newsletter-form #newsletter-lists-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.vwa-newsletter-form .newsletter-list-item {
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.vwa-newsletter-form .newsletter-list-item label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.vwa-newsletter-form .newsletter-list-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* Form Field Responsive */
@media (max-width: 768px) {
    .vwa-newsletter-form,
    .vwa-newsletter-form.vwa-newsletter-unsubscribe {
        margin: 10px;
        padding: 15px;
    }
    
    .vwa-newsletter-form .form-field__input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .vwa-newsletter-form .btn {
        width: 100%;
        padding: 15px;
    }
    
    .vwa-newsletter-form .card-body {
        padding: 15px;
    }
}

/* Loading States */
.vwa-newsletter-form .btn.loading {
    position: relative;
    color: transparent;
}

.vwa-newsletter-form .btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: vwa-spin 1s linear infinite;
}

@keyframes vwa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus Styles for Accessibility */
.vwa-newsletter-form .form-field__input:focus,
.vwa-newsletter-form .form-check-input:focus,
.vwa-newsletter-form .btn:focus {
    outline: 1px solid #007cba;
}

/* Error States */
.vwa-newsletter-form .form-field.error .form-field__input {
    border-bottom-color: #dc3545;
}

.vwa-newsletter-form .form-field.error .form-field__label {
    color: #dc3545;
}

.vwa-newsletter-form .form-field.error .form-field__bar {
    background: #dc3545;
}

/* Animation for alerts */
.vwa-newsletter-form .vwa-alert {
    animation: vwa-slideInDown 0.3s ease-out;
}

@keyframes vwa-slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Abmelde-spezifische Styles */
.vwa-newsletter-unsubscribe {
    max-width: 600px;
    margin: 0 auto;
}

.vwa-newsletter-unsubscribe h3 {
    color: #333;
    margin-bottom: 15px;
}

.vwa-newsletter-unsubscribe p {
    color: #666;
    margin-bottom: 25px;
}

#unsubscribe-email-form {
    margin-bottom: 30px;
}

#unsubscribe-email-form .form-field {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#unsubscribe-email-form .form-field label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    display: block;
}

#unsubscribe-email-form .form-field input {
    flex: 1;
    min-width: 250px;
}

#load-lists {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    height: 48px;
}

#load-lists:hover {
    background: #005a87;
}

#load-lists:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#newsletter-lists-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

#newsletter-lists-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.newsletter-list-item {
    margin-bottom: 12px;
    padding: 8px 0;
}

.newsletter-list-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

.newsletter-list-item input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

#save-subscriptions {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

#save-subscriptions:hover {
    background: #218838;
}

#save-subscriptions:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

#unsubscribe-messages {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    #unsubscribe-email-form .form-field {
        flex-direction: column;
        align-items: stretch;
    }
    
    #unsubscribe-email-form .form-field input {
        min-width: auto;
        margin-bottom: 10px;
    }
    
    #load-lists {
        width: 100%;
    }
} 