/**
 * ERP shared UI — Bootstrap 5 companion utilities.
 * Use with dir="rtl" / logical spacing (ms-*, me-*, ps-*, pe-*) in Blade.
 */

/* -------------------------------------------------------------------------
   Page header
   ------------------------------------------------------------------------- */
.erp-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* -------------------------------------------------------------------------
   Filter card (extends .card)
   ------------------------------------------------------------------------- */
.erp-filter-card .erp-filter-card__actions {
    border-color: var(--bs-border-color-translucent, rgba(0, 0, 0, 0.125)) !important;
}

/* -------------------------------------------------------------------------
   Form controls — 36px height (aligned with .erp-btn)
   ------------------------------------------------------------------------- */
.erp-form-control.form-control,
.erp-form-control.form-select,
textarea.erp-form-control.form-control {
    min-height: 36px;
    height: 36px;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    font-size: 0.875rem;
    border-radius: var(--bs-border-radius, 0.375rem);
}

textarea.erp-form-control.form-control {
    height: auto;
    min-height: 36px;
}

input.erp-form-control[type='date'],
input.erp-form-control[type='datetime-local'],
input.erp-form-control[type='time'] {
    min-height: 36px;
    height: 36px;
}

/* Select2 (Bootstrap 5 theme) — match ERP control height; block + flex avoids baseline / bottom-heavy text */
.select2-container.select2-container--bootstrap-5 {
    display: block !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 36px !important;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-selection--single {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 36px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.25 !important;
    height: auto !important;
    padding-block: 0 !important;
    padding-inline-start: 0.75rem;
    padding-inline-end: 2rem;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto;
    min-width: 0;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* -------------------------------------------------------------------------
   Buttons — 36px height, consistent padding
   ------------------------------------------------------------------------- */
.erp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 36px;
    height: 36px;
    padding: 0 1rem;
    font-size: 0.875rem;
    line-height: 1.25;
    border-radius: var(--bs-border-radius, 0.375rem);
    white-space: nowrap;
}

.erp-btn.btn-sm {
    min-height: 36px;
    height: 36px;
    padding: 0 1rem;
    font-size: 0.875rem;
}

a.erp-btn {
    text-decoration: none;
}

/* Icon-only row actions can stay smaller — not part of this pilot scope */
