@import "tailwindcss/base";
@import "tailwindcss/components";

@import "railsui/actiontext";
@import "railsui/flatpickr";
@import "railsui/navigation";
@import "railsui/scrollable";
@import "railsui/apexcharts";
@import "railsui/forms";
@import "tailwindcss/utilities";

/* AG Grid customizations */

/* Cell editor input - prevent font size increase when editing */
.ag-cell-inline-editing {
  font-size: var(--ag-cell-font-size, var(--ag-font-size)) !important;
  line-height: normal !important;
}
.ag-cell-inline-editing input,
.ag-cell-inline-editing textarea,
.ag-cell-inline-editing select,
.ag-cell-edit-wrapper,
.ag-cell-edit-wrapper input,
.ag-cell-edit-wrapper textarea,
.ag-text-field-input {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* AG Grid popup editor wrapper - ensure consistent font sizing */
.ag-popup-editor {
  font-size: var(--ag-cell-font-size, var(--ag-font-size)) !important;
}
.ag-popup-editor input,
.ag-popup-editor textarea {
  font-size: inherit !important;
}

/* Fix filter input text overlapping search icon */
.ag-floating-filter-input input,
.ag-filter-body input[type="text"] {
  padding-left: 24px !important;
}

/* Hide horizontal scrollbar under pinned left columns */
.ag-pinned-left-cols-container {
  overflow-x: hidden !important;
}

/* Prevent header text wrapping and ellipses */
.ag-header-cell-label {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.ag-header-cell-text {
  overflow: visible !important;
  text-overflow: clip !important;
  padding-right: 24px !important;
}

/* Ensure header has enough height for sort icons */
.ag-header-cell {
  min-height: 40px;
  overflow: visible !important;
}

.ag-header-cell-comp {
  overflow: visible !important;
}
