/* ==========================================================================
   Utility Classes
   Reusable utility classes for common styling patterns across the application
   All custom classes are prefixed with 'rpt-' (prazo planningtool)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */

/* Full viewport height minimum - for full-page layouts */
.rpt-full-height {
  min-height: 100vh;
}

.rpt-no-tb-margin {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   Flex Utilities
   -------------------------------------------------------------------------- */

/* Flex grow to fill available space */
.rpt-flex-grow {
  flex: 1;
}

/* Flex grow with double proportion */
.rpt-flex-grow-double {
  flex: 2;
}

/* Flex grow with quadruple proportion */
.rpt-flex-grow-quadruple {
  flex: 4;
}

/* Flex row with small gap (0.5rem) */
.rpt-flex-gap-small {
  gap: 0.5rem;
}

/* Flex row with medium gap (8px) */
.rpt-flex-gap-medium {
  gap: 8px;
}

/* Flex row with large gap (16px) */
.rpt-flex-gap-large {
  gap: 16px;
}

/* --------------------------------------------------------------------------
   Table Utilities
   -------------------------------------------------------------------------- */

/* Prevent text wrapping in table cells */
.rpt-table-nowrap {
  white-space: nowrap;
}

/* Shrink column to fit content width */
.rpt-table-column-shrink {
  width: 1%;
  white-space: nowrap;
}

/* Auto width for form inputs in tables */
.rpt-table-input-auto {
  width: auto;
}

/* Fixed column width at 40% */
.rpt-table-column-wide {
  width: 40%;
}

/* Fixed column width at 9rem */
.rpt-table-column-fixed {
  width: 9rem;
}

.rpt-table-column-fixed-2 {
  width: 2rem;
}

.rpt-cursor-pointer {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Visibility Utilities
   -------------------------------------------------------------------------- */

/* Hidden by default - for JavaScript toggle interactions */
.rpt-toggle-hidden {
  display: none;
}

/* --------------------------------------------------------------------------
   Scrollable Container Utilities
   -------------------------------------------------------------------------- */

/* Scrollable container with small max height (300px) */
.rpt-scrollable-small {
  overflow-y: auto;
  max-height: 300px;
}

/* Scrollable container with medium max height (400px) */
.rpt-scrollable-medium {
  overflow-y: auto;
  max-height: 400px;
}

/* Scrollable container with large max height (90vh) */
.rpt-scrollable-large {
  overflow-y: auto;
  max-height: 90vh;
}

/* --------------------------------------------------------------------------
   Modal/Overlay Utilities
   -------------------------------------------------------------------------- */

/* Overlay content wrapper with padding and scroll */
.rpt-overlay-wrapper {
  overflow-y: auto;
  padding: 1rem;
}

/* Small modal box (max 500px) */
.rpt-modal-small {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}

/* Medium modal box (max 600px) */
.rpt-modal-medium {
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}

.rpt-modal-medium-b {
  max-width: 600px;
  width: 100%;
}

/* Large modal box (max 1400px) */
.rpt-modal-large {
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
}

/* --------------------------------------------------------------------------
   Component Utilities
   -------------------------------------------------------------------------- */

/* Callout/alert box with rounded corners */
.rpt-callout-rounded {
  border-radius: 6px;
}

/* Button group without bottom margin */
.rpt-buttons-compact {
  margin-bottom: 0;
}

/* Action row for page headers - flex with gap and right margin */
.rpt-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Spacing Utilities
   -------------------------------------------------------------------------- */

/* Top margin of 8px */
.rpt-margin-top-small {
  margin-top: 8px;
}

/* Right margin of 8px */
.rpt-margin-right-small {
  margin-right: 8px;
}

/* Top margin of 1rem */
.rpt-margin-top-medium {
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   Transfer List (Shuttle) Component
   -------------------------------------------------------------------------- */

.rpt-transfer-list-wrapper {
  min-height: 350px;
}

.rpt-transfer-list-pane {
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rpt-transfer-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #f5f5f5;
  border-bottom: 1px solid #dbdbdb;
  border-radius: 4px 4px 0 0;
}

.rpt-transfer-list-search {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #ededed;
}

.rpt-transfer-list-items {
  flex: 1;
  overflow-y: auto;
}

.rpt-transfer-list-item {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s;
}

.rpt-transfer-list-item[hidden] {
  display: none;
}

.rpt-transfer-list-item:hover {
  background-color: #f0f0f0;
}

.rpt-transfer-list-item.is-checked {
  background-color: #e8f4fd;
}

.rpt-transfer-list-check {
  width: 1.25rem;
  margin-right: 0.5rem;
  color: transparent;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.rpt-transfer-list-item.is-checked .rpt-transfer-list-check {
  color: #3273dc;
}

.rpt-transfer-list-label {
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpt-transfer-list-controls {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rpt-transfer-list-controls .buttons {
  gap: 0.25rem;
}
