/* Dialog-Styling für konsistente Darstellung */
.dialog-width-800 {
    max-width: 800px !important;
    width: 100% !important;
    height: 80vh !important;
    max-height: 80vh !important;
}

.mud-dialog-width-full {
    max-width: 95vw !important;
    width: 100% !important;
    max-height: 80vh !important;
}

/* Dialog-Container optimieren */
.mud-dialog .mud-dialog-content {
    padding: 1rem !important;
    overflow-y: auto;
    display: flex !important;
    flex-direction: column !important;
}

/* Spezifische Höhen für EditTeamMemberDialog und MemberEditDialog */
.edit-team-member-dialog .mud-dialog-content,
.member-edit-dialog .mud-dialog-content {
    height: calc(80vh - 140px) !important; /* Abzug für Header und Actions */
    max-height: calc(80vh - 140px) !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .dialog-width-800 {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .mud-dialog-width-full {
        max-width: 100vw !important;
        width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .mud-dialog .mud-dialog-content {
        padding: 0.75rem !important;
    }

    /* Spezifische Höhen für EditTeamMemberDialog und MemberEditDialog im Mobile */
    .edit-team-member-dialog .mud-dialog-content,
    .member-edit-dialog .mud-dialog-content {
        height: calc(100vh - 140px) !important;
        max-height: calc(100vh - 140px) !important;
    }
}

/* Erforderliche Felder hervorheben */
.required-field .mud-input-label::after {
    content: ' *';
    color: var(--mud-palette-error);
}

.mud-collapse-entering {
    opacity: 0;
    transform: translateY(-10px);
}

.mud-collapse-entered {
    opacity: 1;
    transform: translateY(0);
}

.mud-collapse-exiting {
    opacity: 1;
    transform: translateY(0);
}

.mud-collapse-exited {
    opacity: 0;
    transform: translateY(-10px);
    height: 0 !important;
    overflow: hidden;
}

/* Abschnitt-Überschriften */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Formular-Container */
.form-container {
    padding: 1rem;
}

/* Konsistente Abstände für Grid-Items */
.mud-grid-item {
    margin-bottom: 0.5rem;
}

/* Bessere Darstellung für TinyMCE Editor */
.editor-container {
    min-height: 200px;
}

.editor-container .mud-field-root {
    min-height: 200px;
}

/* Textfeld für mehrzeilige Notizen */
.notes-textarea {
    min-height: 200px !important;
    max-height: 300px !important;
    resize: vertical !important;
}

.notes-textarea .mud-input-control {
    min-height: 200px !important;
}

.notes-textarea .mud-input-control textarea {
    min-height: 200px !important;
    resize: vertical !important;
}

/* Editor container without scrolling */
.editor-container-no-scroll {
    min-height: 200px;
    overflow: visible !important;
}

.editor-container-no-scroll .mud-field-root {
    min-height: 200px;
    overflow: visible !important;
}

.editor-container-no-scroll .mud-input-control {
    overflow: visible !important;
}

.editor-container-no-scroll .tox-editor-container {
    overflow: visible !important;
}

/* Loading-Zustände */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Dialog-spezifische Verbesserungen */
.mud-dialog {
    display: flex !important;
    flex-direction: column !important;
}

.mud-dialog-title {
    flex-shrink: 0;
    padding: 1rem 1rem 0.5rem 1rem !important;
}

.mud-dialog-actions {
    flex-shrink: 0;
    padding: 0.5rem 1rem 1rem 1rem !important;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
}

/* Container-Layout für bessere Scroll-Performance */
.h-100.d-flex.flex-column {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.flex-grow-1 {
    flex: 1 !important;
    min-height: 0; /* Wichtig für Flexbox-Scrolling */
}

/* Styling für Fehlermeldungen */
.mud-alert {
    margin-top: 1rem;
    border-radius: var(--mud-default-borderradius);
}

/* Konsistente Farben */
.section-divider {
    border-color: var(--mud-palette-lines-default);
    margin: 2rem 0;
}


/* Konsistente Icon-Größen */
.section-icon {
    font-size: 1.25rem;
    color: var(--mud-palette-primary);
}

/* Styling für Positionenauswahl */
.positions-container {
    background: var(--mud-palette-background-gray);
    border-radius: var(--mud-default-borderradius);
    padding: 1rem;
    margin-top: 1rem;
}

/* Dialog-Titel einheitlich gestalten */
.mud-dialog-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
