/* Custom wrapper for invoice styles */
.invoice-form-table {
  /* Add spacing for better visual appearance */
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Ensure uniform column widths in invoice items repeater */
.invoice-form-table .filament-forms-repeater-component [data-field-wrapper] {
  flex: 1;
  min-width: 0;
}

/* Make sure the text inputs and selects have the same height */
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-text-input-component
  input,
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-select-component
  select,
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-date-time-picker-component
  input {
  height: 38px !important;
  max-height: 38px !important;
}

/* Ensure the file upload component displays properly in the grid */
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-file-upload-component {
  width: 100%;
  min-height: 38px;
  max-height: 38px;
  height: 38px;
  overflow: hidden;
}

/* Make file upload panel more compact */
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-file-upload-component
  .filepond--panel-root {
  height: 38px !important;
}

.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-file-upload-component
  .filepond--root {
  min-height: 38px !important;
  max-height: 38px !important;
  margin-bottom: 0 !important;
}

/* Make the textarea consistent height */
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-textarea-component
  textarea {
  height: 38px;
  min-height: 38px;
}

/* Ensure the repeater columns have consistent width */
.invoice-form-table .filament-forms-repeater-component .grid-cols-6 > * {
  width: calc(100% / 6);
  max-width: calc(100% / 6);
}

/* Add button styling */
.invoice-form-table
  .filament-forms-repeater-component
  button[type="button"].filament-forms-repeater-component-add-item-button {
  width: auto;
  margin-top: 1rem;
}

/* Force all form elements to have consistent height */
.invoice-form-table
  .filament-forms-repeater-component
  .filament-forms-field-wrapper {
  min-height: 38px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Make the file upload panel more compact */
.invoice-form-table .filament-forms-file-upload-component .filepond--root {
  margin: 0 !important;
}

.invoice-form-table
  .filament-forms-file-upload-component
  .filepond--drop-label {
  min-height: 38px !important;
  height: 38px !important;
}

.invoice-form-table .filament-forms-file-upload-component .filepond--item {
  margin-top: 0 !important;
}

.invoice-form-table .filament-forms-file-upload-component .filepond--file-info {
  height: 38px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Fix select sizing */
.invoice-form-table .filament-forms-select-component {
  height: 38px !important;
}
