/* Modal Formular Styles */
.formular-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Nur Validierungs-Pfeile entfernen, aber Kalender behalten */
.formular-modal input::-webkit-outer-spin-button,
.formular-modal input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.formular-modal input[type=number] {
    -moz-appearance: textfield !important;
}

/* Relative Position für Container */
.formular-modal .form-group {
    position: relative;
}

/* Sehr aggressive Regel: Alle Schritte verstecken */
.formular-modal .form-step,
.formular-modal div[data-step],
.formular-modal div[class*="form-step"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Nur aktive Schritte zeigen */
.formular-modal .form-step.active,
.formular-modal div[data-step].active,
.formular-modal div[class*="form-step"].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
}

/* Spezielle Regeln für bedingte Schritte */
.formular-modal .form-step[data-condition] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}
.formular-modal .form-step[data-condition].active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
}

.formular-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    border-radius: 0;
    padding: 0;
    max-width: 98vw;
    max-height: 98vh;
    width: 1000px;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.formular-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    background: #f8f9fa;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #333333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-close:hover {
    background: #e43147;
    color: white;
}



.modal-body {
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
    color: #333333;
    background: #ffffff;
}

/* Scrollbar Styling */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #e43147;
    border-radius: 0;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #b8002e;
}

/* Form Container */
.form-container {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    color: #333333;
}

.form-title {
    display: none !important; /* Hidden in modal, using modal-title instead */
}

.form-subtitle {
    text-align: center;
    color: #666666;
    margin-bottom: 30px;
    font-size: 1rem;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
    position: relative;
}

.progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 0;
    overflow: hidden;
}

.progress-bar {
    background: #e43147;
    transition: width 0.5s ease;
    border-radius: 0;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.8rem;
    color: #666666;
}

/* Form Steps */
.form-step {
    display: none !important;
    animation: fadeInUp 0.4s ease;
}

.form-step.active {
    display: block !important;
}

/* Spezielle Regel für Schritt 2: Nur der passende anfragetyp soll sichtbar sein */
.form-step[data-step="2"] {
    display: none !important;
}

.form-step[data-step="2"].active {
    display: block !important;
}

/* Verstecke alle anderen Schritt 2 Varianten, wenn eine aktiv ist */
.form-step[data-step="2"][data-anfragetyp]:not(.active) {
    display: none !important;
}

/* Verstecke alle anderen Schritt 3 Varianten, wenn eine aktiv ist */
.form-step[data-step="3"][data-anfragetyp]:not(.active) {
    display: none !important;
}

/* Verstecke alle anderen Schritt 4 Varianten, wenn eine aktiv ist */
.form-step[data-step="4"][data-anfragetyp]:not(.active) {
    display: none !important;
}

/* Zusätzliche Sicherheit: Verstecke alle Schritte die nicht zum aktuellen Anfragetyp gehören */
.form-step[data-anfragetyp]:not([data-anfragetyp="allgemein"]):not(.active) {
    display: none !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #333333;
    text-align: center;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333333;
    font-size: 0.95rem;
}

.form-control {
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 0;
    padding: 10px 14px;
    color: #333333;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #e43147;
    box-shadow: 0 0 0 3px rgba(228, 49, 71, 0.1);
    background: #ffffff;
}

.form-control::placeholder {
    color: #6c757d;
}

/* Radio Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Radio/Checkbox Visuals */
.radio-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.radio-item:hover {
    background: transparent;
    border-color: #e43147;
}

.radio-item input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.radio-item label {
    width: 100%;
    padding-left: 30px;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #333333;
    transition: all 0.3s ease;
}

.radio-item label:before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked + label:before {
    border-color: #e43147;
    background: #e43147;
}

/* Spezielle Regel für Datenschutz: Keine dicke Formatierung */
.radio-item input[type="radio"]:checked + label {
    color: #333333;
    font-weight: normal;
}

/* Checkbox */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: transparent;
    border-radius: 0;
}

.checkbox-item input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.1);
    accent-color: #e43147;
}

.checkbox-item label {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333333;
}

.checkbox-item input[type="checkbox"]:checked + label {
    color: #e43147;
    font-weight: 600;
}

.checkbox-item a {
    color: #e43147;
    text-decoration: none;
}

.checkbox-item a:hover {
    text-decoration: underline;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 10px 25px;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 100px;
}

.btn-primary {
    background: #e43147;
    color: white;
}

.btn-primary:hover {
    background: #b8002e;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
    transform: none;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: none;
    box-shadow: none;
}

/* Success/Error Messages */
.success-message,
.error-message {
    text-align: center;
    padding: 30px;
    border-radius: 0;
    animation: fadeInUp 0.5s ease;
}

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

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

.success-icon,
.error-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.success-icon {
    color: #28a745;
}

.error-icon {
    color: #dc3545;
}

.success-message h3,
.error-message h3 {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.3rem;
}

.success-message p,
.error-message p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.error-message a {
    color: #e43147;
    text-decoration: none;
}

.error-message a:hover {
    text-decoration: underline;
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Keine grünen Haken bei Radio-Buttons und Checkboxen */
.radio-group .valid-feedback,
.checkbox-item .valid-feedback {
    display: none !important;
}

/* Browser-Validierung komplett deaktivieren */
.formular-modal form {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.formular-modal input:focus,
.formular-modal select:focus,
.formular-modal textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(228, 49, 71, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 65vh;
    }
    
    .form-step h3 {
        font-size: 1.3rem;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .radio-item {
        padding: 10px;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .form-step h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Modal backdrop click to close */
.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
} 