/* Grundlegende Stile */
body {
    background-color: #f8f9fa;
}

/* Card Styling */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

/* Einheitliche Feldbreiten für alle Formularelemente */
.card-body {
    max-width: 1000px;
    margin: 0 auto;
}

fieldset {
    max-width: 800px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Letzte Fieldset ohne Rahmen */
fieldset:last-of-type {
    border-bottom: none;
}

/* Form Elements */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
    border-color: #80bdff;
}

/* Einheitliche Breite für alle Auswahlfelder */
.form-select, 
select.form-select {
    width: 100%;
    max-width: 300px;
}

/* Radio Buttons und Checkboxen */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Einheitliche Breite für Radio-Gruppen */
.form-check-inline {
    min-width: 80px;
}

/* Required Fields */
.form-label.required:after {
    content: " *";
    color: #dc3545;
    margin-left: 3px;
}

.required-hint {
    display: block;
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Textarea Höhenanpassung */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Häufigkeitsauswahl einheitlich */
#medikation_haeufigkeit,
#injektion_haeufigkeit {
    width: 100%;
    max-width: 300px;
    margin-top: 0.5rem;
}

/* Direkte Korrektur für die Auswahlfelder in col-6 */
.col-6 .form-select {
    width: 100% !important;
    max-width: 100% !important;
}

/* Bessere Mobile Ansicht */
@media (max-width: 768px) {
    .form-check-inline {
        display: block;
        margin-right: 0;
        margin-bottom: 0.5rem;
        min-width: auto;
    }
    
    .form-select,
    select.form-select,
    #medikation_haeufigkeit,
    #injektion_haeufigkeit {
        max-width: 100%;
    }
}

/* Hover-Effekte für besseres Feedback */
.form-check:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* Submit Button */
.btn-primary {
    padding: 0.5rem 2rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-label {
    font-weight: 500;
}

/* ICD-10 Autocomplete Styling */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ui-autocomplete .ui-menu-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.ui-autocomplete .ui-menu-item:last-child {
    border-bottom: none;
}

.ui-autocomplete .ui-menu-item div {
    font-size: 14px;
    line-height: 1.4;
}

.ui-autocomplete .ui-menu-item small {
    color: #666;
    font-size: 12px;
}

.ui-autocomplete .ui-state-active {
    background: #f8f9fa;
    border: none;
    margin: 0;
}
