/* Estimart component layer — Bootstrap 5 foundation without MDB core. */
:root {
  --estimart-control-height: 44px;
  --estimart-control-radius: .72rem;
  --estimart-border: #d9e3e0;
  --estimart-surface: #fff;
  --estimart-surface-soft: #f4f7f6;
  --estimart-primary: var(--color2, #58736d);
  --estimart-primary-dark: #3f5954;
  --estimart-focus: rgba(0, 184, 196, .18);
}
.form-outline { position: relative; }
.form-outline > .form-control,
.form-outline > .form-select { min-height: var(--estimart-control-height); }
.form-control, .form-select, .input-group-text {
  min-height: var(--estimart-control-height);
  border-color: var(--estimart-border);
  border-radius: var(--estimart-control-radius);
}
.form-control:focus, .form-select:focus {
  border-color: var(--color4, #00b8c4);
  box-shadow: 0 0 0 .2rem var(--estimart-focus);
}
.form-outline label { color: #52635f; font-weight: 600; margin-bottom: .42rem; }
.estimart-ripple { position: relative; overflow: hidden; }
.estimart-native-select[multiple] { min-height: 118px; padding-block: .5rem; }
.estimart-select-filter { display: grid; gap: .38rem; width: 100%; }
.estimart-select-filter__input { min-height: 36px; }
.estimart-datepicker { position: relative; }
.estimart-datepicker .form-control { padding-right: 3rem; }
.estimart-native-date-picker {
  position: absolute; right: .75rem; bottom: 0; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.estimart-date-trigger {
  position: absolute; right: .5rem; bottom: .32rem; width: 36px; height: 36px;
  border: 0; border-radius: .55rem; background: transparent; color: var(--estimart-primary);
  display: inline-grid; place-items: center;
}
.estimart-date-trigger:hover { background: var(--estimart-surface-soft); }
.estimart-date-trigger svg { width: 20px; height: 20px; }
.estimart-data-table th.estimart-sortable { cursor: pointer; user-select: none; padding-right: 1.8rem; position: relative; }
.estimart-data-table th.estimart-sortable::after { content: '↕'; position: absolute; right: .65rem; opacity: .35; }
.estimart-data-table th[aria-sort="ascending"]::after { content: '↑'; opacity: .85; }
.estimart-data-table th[aria-sort="descending"]::after { content: '↓'; opacity: .85; }
.estimart-editor { border: 1px solid var(--estimart-border); border-radius: .8rem; background: #fff; overflow: hidden; }
.estimart-editor__toolbar { display: flex; flex-wrap: wrap; gap: .35rem; padding: .55rem; background: var(--estimart-surface-soft); border-bottom: 1px solid var(--estimart-border); }
.estimart-editor__toolbar .btn { min-height: 32px; padding: .25rem .55rem; }
.estimart-editor__content { min-height: 145px; padding: .85rem 1rem; outline: 0; }
.estimart-editor__content:focus { box-shadow: inset 0 0 0 2px var(--estimart-focus); }
.estimart-lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000; display: none; place-items: center;
  padding: 4rem 2rem 2rem; background: rgba(10, 21, 19, .88);
}
.estimart-lightbox-overlay.show { display: grid; }
.estimart-lightbox-overlay img { max-width: min(94vw, 1400px); max-height: 82vh; object-fit: contain; border-radius: .8rem; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.estimart-lightbox-close { position: absolute; top: 1.2rem; right: 1.4rem; border: 0; color: #fff; background: transparent; font-size: 2.25rem; }
.estimart-lightbox-caption { color: #fff; text-align: center; margin-top: .8rem; }
body.estimart-lightbox-open { overflow: hidden; }
/* MDB-form compatibility without MDB CSS. */
.form-outline .form-label { position: static; transform: none; pointer-events: auto; }
.form-outline .form-notch { display: none !important; }
.select-wrapper, .datepicker, .datatable { width: 100%; }
/* Calendar plugin receives Estimart / Bootstrap treatment while its legacy engine remains. */
.calendar { --mdb-calendar-current-day-bg: var(--color2, #58736d); --mdb-calendar-current-day-color: #fff; }
.calendar .calendar-tools button, .calendar .btn { border-radius: .65rem !important; }
.calendar .calendar-table { border-color: var(--estimart-border) !important; }
.mention-dropdown, .mention-list { border-radius: .7rem !important; border-color: var(--estimart-border) !important; }
@media (max-width: 767.98px) {
  .estimart-editor__toolbar { overflow-x: auto; flex-wrap: nowrap; }
  .estimart-lightbox-overlay { padding-inline: 1rem; }
}

/* Estimart 3.8 overlay-state guarantees. These rules intentionally duplicate
   Bootstrap's closed states so legacy templates remain safe if a page-specific
   stylesheet or partial load interrupts the framework cascade. */
.modal:not(.show) { display: none !important; }
.modal.show { display: block; }
.dropdown-menu:not(.show) { display: none !important; }
.dropdown-menu.show { display: block; }
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height .25s ease; }
.offcanvas:not(.show) { visibility: hidden; }
.tooltip:not(.show), .popover:not(.show) { display: none; }
.modal-backdrop.estimart-stale-backdrop { display: none !important; }
[hidden] { display: none !important; }
