/* ==========================================================================
   TSG Trip CRM — theme fixes (visual only)
   Load AFTER tsg-theme.css. Fixes filter controls where the leading icon sat
   on top of the text and date fields overlapped their neighbours.
   No markup, class names or behaviour are changed.
   ========================================================================== */

/* Dashboard "Active Tasks" filters: make room for the icon, restore the arrow */
.app-shell .dashboard-task-filters select,
.app-shell .dashboard-task-filters input {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding-left: 42px !important;
  width: 100%;
}
.app-shell .dashboard-task-filters select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23425a61' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 14px;
  padding-right: 36px !important;
}
.app-shell .dashboard-task-filters input[type="date"] {
  padding-right: 10px !important;
}
/* give the two date fields a little more room than the old fixed columns */
@media (min-width: 1101px) {
  .app-shell .dashboard-task-filters {
    grid-template-columns: minmax(220px, 1.3fr) minmax(170px, .8fr) minmax(190px, .8fr) minmax(190px, .8fr) minmax(130px, auto);
  }
}

/* Editable-table cells: date/time/text inputs must never be wider than their cell */
.table-input,
.table-select {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
.table-input[type="date"],
.table-input[type="time"] {
  width: 100%;
}

/* Search bar above each trip-workspace table: label + box wrap instead of colliding */
.table-search-field {
  flex-wrap: wrap;
  min-width: min(260px, 100%);
}
.table-search-field span {
  white-space: normal;
}
.table-search-field input {
  box-sizing: border-box;
  flex: 1 1 180px;
  min-width: 0;
}

/* Provider search box has a 190px minimum that is wider than some grid columns */
.provider-picker {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

/* Travelers Finance: Add-ons picker (tick none, one or many) */
.finance-addons-list {
  background: #fff;
  border: 1px solid var(--b-line-strong, #cbc1b5);
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}
.finance-addon-option {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.finance-addon-option input[type="checkbox"] {
  accent-color: #093542;
  flex: 0 0 auto;
  height: 18px;
  margin: 0;
  min-height: 0;
  width: 18px;
}
.finance-addon-option strong { font-size: 14px; }
.finance-addon-option em {
  color: #507282;
  font-size: 12px;
  font-style: normal;
  margin-left: auto;
}
.finance-addons-empty { color: #507282; font-size: 13px; margin: 0; }

/* Rooming Details tab */
.tab[data-tab="roomingDetails"],
.tab-section-heading[data-icon="roomingDetails"] { --section-icon: var(--graphic-accommodations); }

.rooming-list { display: grid; gap: 18px; }
.rooming-card { width: 100%; }
.rooming-meta { color: #507282; font-size: 13px; margin: 0 0 12px; }
.rooming-count-field { max-width: 220px; }
.rooming-rooms {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  margin-top: 14px;
}
.rooming-room {
  background: #fff;
  border: 1px solid var(--b-line-strong, #cbc1b5);
  border-top: 3px solid #bdff00;
  padding: 12px 14px 14px;
}
.rooming-room.is-over { border-top-color: #ed641e; }
.rooming-room-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rooming-room-head strong { color: #093542; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.rooming-room-count { color: #507282; font-size: 12px; font-weight: 700; }
.rooming-room.is-over .rooming-room-count { color: #ed641e; }
.rooming-room-fields { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.rooming-room-fields .flight-card-field-wide { grid-column: 1 / -1; }
.rooming-room-fields .flight-card-field { min-width: 0; }
.rooming-room-fields select,
.rooming-room-fields input { max-width: 100%; min-width: 0; width: 100%; }
.rooming-unallocated { background: #f6f3ee; border-left: 3px solid #bdff00; color: #093542; font-size: 13px; margin: 14px 0 0; padding: 8px 12px; }
.rooming-unallocated.has-unallocated { border-left-color: #ed641e; }
.rooming-empty { color: #507282; font-size: 13px; margin: 10px 0 0; }
@media (max-width: 640px) {
  .rooming-room-fields { grid-template-columns: 1fr; }
}
