/* ========================================
   EXTRA SPACING REDUCTION
   For button sections and filtration criteria
   ======================================== */

/* Reduce spacing in section dividers */
body .rz-card.rz-variant-outlined [style*="border: 1px solid"] {
    padding: 0.2rem !important;
    margin: 0.1rem 0 !important;
}

/* Tighten button group spacing */
body .rz-stack.rz-horizontal {
    gap: 0.15rem !important;
    row-gap: 0.15rem !important;
}

body .rz-button {
    margin: 0 !important;
}

/* Compact alerts */
body .rz-alert {
    padding: 0.35rem 0.5rem !important;
    margin-bottom: 0.15rem !important;
    font-size: var(--form-font-size) !important;
}

/* Pager - very compact */
body .rz-pager {
    padding: 0.25rem 0.4rem !important;
    font-size: var(--form-font-size) !important;
}

/* Grid container spacing */
.modern-grid-container,
.modern-enterprise-grid {
    margin: 0.1rem 0 !important;
}

/* Reduce spacing between tabs */
body .rz-tabview-nav {
    margin-bottom: 0 !important;
}

body .rz-tabview-panel {
    padding: 0.15rem !important;
}

/* Compact filtration section */
.filteration-criteria-container,
[style*="Filteration Criteria"] {
    margin-bottom: 0.1rem !important;
}

/* Reduce spacing in form sections */
body .rz-card.rz-variant-outlined {
    margin-bottom: 0.15rem !important;
}

/* Very tight label spacing */
body .rz-form-field-label {
    margin-bottom: 0.12rem !important;
    line-height: 1.1 !important;
    padding: 0 0.1rem !important;
    background-color: #ffffff !important;
    inset-inline-start: 0.5rem !important;
    inset-inline-end: auto !important;
    text-align: left !important;
}

/* Collapse expanded spacing around text elements */
body .rz-text {
    margin: 0 !important;
    padding: 0 !important;
}

/* Reduce dialog/popup spacing */
body .rz-dialog-title {
    margin-bottom: 0.35rem !important;
}

/* Compact dropdown and autocomplete panels */
body .rz-dropdown-panel,
body .rz-autocomplete-panel {
    font-size: var(--form-font-size) !important;
}

body .rz-dropdown-item,
body .rz-autocomplete-item,
body .rz-autocomplete-list-item,
body .rz-multiselect-item, body .rz-autocomplete-items li {
    padding: 0.35rem 0.75rem !important;
    line-height: 1.2 !important;
    font-size:inherit !important;
}

/* Remove excessive list spacing */
body .rz-list-item {
    padding: 0.2rem !important;
}

/* Compact datetime picker */
body .rz-datepicker-calendar {
    font-size: 0.75rem !important;
}

/* Stack items with minimal spacing */
body .rz-stack {
    row-gap: 0.1rem !important;
    gap: 0.1rem !important;
}

body .rz-stack.rz-vertical {
    gap: 0.1rem !important;
}

/* Header action bar - very compact */
.master-form-action-bar {
    margin-bottom: 0.15rem !important;
}

.master-header-layout {
    gap: 0.25rem !important;
}

/* Title sections */
body .rz-card.rz-variant-flat:first-of-type {
    margin-bottom: 0.15rem !important;
}

/* Collapse radio and checkbox groups */
body .rz-radio-group,
body .rz-checkbox-group {
    gap: 0.15rem !important;
}

/* Very compact columns */
body .rz-col {
    gap: 0.1rem !important;
}

/* No extra spacing in rows */
body .rz-row {
    margin-bottom: 0.2rem !important;
    padding-bottom: 0 !important;
}

/* Keep consistent vertical gap for template/criteria controls */
body .rz-templateform .rz-row,
body .rz-card.rz-variant-outlined .rz-row {
    row-gap: 0.25rem !important;
}

/* Remove spacing from dividers and separators */
.rz-divider {
    margin: 0.1rem 0 !important;
    padding: 0 !important;
}

/* Tight grid header height */
body .rz-grid-header {
    padding: 0 !important;
}

/* Checkbox label spacing */
body .rz-stack:has(> .rz-chkbox):has(> .rz-label) > .rz-label {
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* Badge and pill spacing */
body .rz-badge {
    margin: 0 0.2rem 0 0 !important;
}

/* List items */
body .rz-listbox-item {
    padding: 0.2rem 0.4rem !important;
    font-size: var(--form-font-size) !important;
}

/* Message boxes */
body .rz-message {
    padding: 0.3rem 0.5rem !important;
    margin-bottom: 0.1rem !important;
    font-size: var(--form-font-size) !important;
}

/* Splitter spacing */
body .rz-splitter-panel {
    padding: 0.2rem !important;
}

/* Card spacing */
body .rz-card {
    margin-bottom: 0.15rem !important;
}

/* Panel spacing */
body .rz-panel {
    margin-bottom: 0.15rem !important;
}
