/* ================================================
   Universal Dialog Field Alignment and Spacing
   Consistent styles for ALL dialogs in the application
   ================================================ */

/* ====== PADDING RULES ====== */

/* Remove excessive padding from ALL fields with Dense margin */
.mud-input-margin-dense .mud-input-slot,
.mud-input-margin-dense input.mud-input-root,
.mud-select.mud-input-margin-dense .mud-input-slot {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}


/* Special handling for textareas */
textarea.mud-input-slot.mud-input-root-margin-dense {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

textarea.mud-input-slot:not(.mud-input-root-margin-dense) {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* ====== MARGIN RULES ====== */

/* Remove all default margins - let container handle spacing */
/* Exception: Don't affect AccessibleSwitch components */
.mud-dialog-content .mud-input-control:not(.accessible-switch-container):not(.accessible-switch-container *),
.mud-dialog-content .mud-select:not(.accessible-switch-container):not(.accessible-switch-container *),
.mud-dialog-content .mud-form-control:not(.accessible-switch-container):not(.accessible-switch-container *) {
    margin: 0 !important;
}



/* For dialogs NOT using MudGrid (like neo-dense), add consistent spacing */
.neo-dense .mud-input-control:not(:last-child),
.neo-dense .mud-select:not(:last-child),
.neo-dense .mud-form-control:not(:last-child) {
    margin-bottom: 16px !important;
}

/* ====== HEIGHT NORMALIZATION ====== */

/* Ensure consistent field heights */
.mud-dialog-content .mud-input-control-margin-dense {
    min-height: 36px !important;
}

.mud-dialog-content .mud-input-control:not(.mud-input-control-margin-dense) {
    min-height: 48px !important;
}

/* ====== ADORNMENT ALIGNMENT ====== */

/* Align adornments with field padding */
.mud-input-margin-dense .mud-input-adornment {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.mud-input:not(.mud-input-margin-dense) .mud-input-adornment {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* ====== HELPER TEXT SPACING ====== */

/* Consistent helper text spacing */
.mud-input-control-helper-container {
    margin-top: 4px !important;
    padding: 0 14px !important;
}

/* ====== SPECIAL COMPONENTS ====== */

/* Date pickers */
.mud-picker-input .mud-input-slot.mud-input-root-margin-dense {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.mud-picker-input .mud-input-slot:not(.mud-input-root-margin-dense) {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Multi-select */
.mud-select[multiple] .mud-input-slot {
    min-height: 40px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Switches and checkboxes */
.mud-input-control-boolean-input {
    margin: 0 !important;
    padding: 8px 0 !important;
}
