/* utilities/display.css - Utility classes for display-related properties */

/* Flex utilities */
.flex {
  display: flex;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 12px;
}

.gap-lg {
  gap: 16px;
}

.flex-1 {
  flex: 1;
}

.flex-1-5 {
  flex: 1.5;
}

.flex-2 {
  flex: 2;
}


.flex-auto {
  flex: 0 0 auto;
}

/* Overflow utilities */
.overflow-auto {
  overflow: auto;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

.overflow-x-hidden {
  overflow-x: hidden;
}

.text-ellipsis {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* For use inside table cells - needs display:block to constrain width */
.truncate-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Display utilities */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

/* Scroll utilities */
.scroll-y {
  overflow-y: auto;
}

.no-scrollbar {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.w-auto {
  width: auto !important;
}

.max-w-xs {
  max-width: 300px !important;
}

.max-w-sm {
  max-width: 400px !important;
}

.max-w-md {
  max-width: 600px !important;
}

/* Generic input + button combination (for search fields, filters, etc.) */
.input-button-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  width: 100%;
}

.input-button-group > input,
.input-button-group > select {
  flex: 1;
  min-width: 0;
}

.input-button-group > button {
  flex-shrink: 0;
}

/* Flexible action button containers */
.action-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.action-group--right {
  justify-content: flex-end;
}

.action-group--split {
  justify-content: space-between;
}

.action-group--left {
  justify-content: flex-start;
}