/* [TFH-999:TFH_COMMON:SHARED-REFINEMENTS-CSS]
   Cross-module refinements that were unmarked at the end of the original styles.css.
   Loaded LAST to keep the original cascade. Candidates to be moved into their own modules later. */

/* =========================================================
   RESERVATION REFINEMENT 2026-09-21
   Dense 4D-style operational workspace for Hotel / Flight / Transport.
   ========================================================= */
.tfh-res-index-screen .tfh-module-header,
#tfhHotelScreen .tfh-module-header,
#tfhFlightScreen .tfh-module-header,
#tfhTransportScreen .tfh-module-header { padding-top: 10px; padding-bottom: 10px; }

.tfh-res-index-screen .tfh-module-heading > div > span,
#tfhHotelScreen .tfh-module-heading > div > span,
#tfhFlightScreen .tfh-module-heading > div > span,
#tfhTransportScreen .tfh-module-heading > div > span { display:none; }

.tfh-res-index-screen .tfh-module-heading h1,
#tfhHotelScreen .tfh-module-heading h1,
#tfhFlightScreen .tfh-module-heading h1,
#tfhTransportScreen .tfh-module-heading h1 { margin-bottom: 1px; }

.tfh-res-index-body { padding: 8px 12px 6px; }
.tfh-res-index-screen .tfh-index-panel { gap: 6px; padding: 8px 10px; }
.tfh-res-index-screen .tfh-index-mode-row { min-height: 0; padding: 4px 7px; }
.tfh-res-index-screen .tfh-index-filter-grid { gap: 6px 8px; }
.tfh-res-index-screen .tfh-form-field { gap: 3px; }
.tfh-res-index-screen .tfh-form-field > span { font-size: .60rem; }
.tfh-res-index-screen .tfh-form-field input,
.tfh-res-index-screen .tfh-form-field select { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
.tfh-res-index-screen .tfh-index-grid-toolbar { min-height: 34px; padding: 3px 0; }
.tfh-res-index-screen .tfh-index-summary { gap: 2px; font-size: .63rem; }
.tfh-res-index-screen .tfh-index-footer { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }

.tfh-res-sortbar {
  display:flex; align-items:center; gap:4px; min-height:32px; padding:3px 5px;
  overflow-x:auto; border:1px solid rgba(17,49,84,.12); border-radius:8px;
  background:linear-gradient(#f9fbfd,#e9eef3); scrollbar-width:thin;
}
.tfh-res-sort-label { flex:0 0 auto; padding:0 5px; color:#607286; font-size:.55rem; font-weight:900; letter-spacing:.12em; }
.tfh-res-sort-button {
  flex:0 0 auto; min-height:24px; padding:3px 7px; border:1px solid rgba(17,49,84,.15);
  border-radius:5px; color:#263c52; background:#fff; font-size:.59rem; font-weight:750; cursor:pointer;
}
.tfh-res-sort-button span { margin-left:4px; color:#7a8998; }
.tfh-res-sort-button:hover { border-color:#6785a1; background:#f4f8fb; }
.tfh-res-sort-button.is-active { color:#fff; border-color:#334d63; background:linear-gradient(#6f879b,#334d63); }
.tfh-res-sort-button.is-active span { color:#fff; }

/* Dense index cards: more reservations visible in one look. */
.tfh-res-index-screen .tfh-date-group { gap:3px; }
.tfh-res-index-screen .tfh-date-group-header { min-height:28px; padding:4px 8px; }
.tfh-res-index-screen .tfh-date-group-rows { gap:4px; }
.tfh-res-index-screen .tfh-index-row { border-radius:7px; }
.tfh-transport-index-row { min-height:84px; gap:4px; padding:6px 9px; }
.tfh-transport-row-head > span:first-child { gap:1px; }
.tfh-transport-row-grid { gap:4px; }
.tfh-transport-row-grid > span { gap:1px; padding:4px 6px; border-radius:5px; }
.tfh-transport-row-address { padding:3px 7px; font-size:.62rem; }
.tfh-transport-row-footer { font-size:.59rem; }

/* Entry screens: remove presentation bulk and maximize the working surface. */
#tfhHotelScreen .tfh-hotel-body,
#tfhFlightScreen .tfh-flight-body,
#tfhTransportScreen .tfh-transport-body { padding-top:8px; padding-bottom:8px; }
#tfhHotelScreen .tfh-form-card,
#tfhFlightScreen .tfh-form-card,
#tfhTransportScreen .tfh-form-card { padding-top:10px; padding-bottom:10px; }
#tfhHotelScreen .tfh-form-section,
#tfhFlightScreen .tfh-form-section,
#tfhTransportScreen .tfh-form-section { gap:7px; }
#tfhHotelScreen .tfh-form-field,
#tfhFlightScreen .tfh-form-field,
#tfhTransportScreen .tfh-form-field { gap:3px; }
#tfhHotelScreen .tfh-form-field input,
#tfhHotelScreen .tfh-form-field select,
#tfhFlightScreen .tfh-form-field input,
#tfhFlightScreen .tfh-form-field select,
#tfhTransportScreen .tfh-form-field input,
#tfhTransportScreen .tfh-form-field select { min-height:34px; }
#tfhHotelScreen .tfh-module-footer,
#tfhFlightScreen .tfh-module-footer,
#tfhTransportScreen .tfh-module-footer { min-height:52px; padding-top:6px; padding-bottom:6px; }
.tfh-index-row-rich { min-height:82px; gap:4px; padding:6px 9px; }
.tfh-index-rich-heading,.tfh-index-rich-footer { gap:8px; }
.tfh-index-rich-facts { gap:4px; }
.tfh-index-fact { gap:1px; padding:4px 6px; border-radius:5px; }
.tfh-index-rich-hotel { gap:1px; padding:4px 7px; }
.tfh-index-rich-description>span { font-size:.60rem; line-height:1.25; -webkit-line-clamp:1; }
.tfh-flight-index-row { min-height:82px; gap:4px; padding:6px 9px; }
.tfh-flight-row-head > span:first-child { gap:1px; }
.tfh-flight-row-grid { gap:4px; }
.tfh-flight-row-grid > span { gap:1px; padding:4px 6px; border-radius:5px; }
.tfh-flight-row-details { font-size:.59rem; }

/* =========================================================
   TFH-202 Transport Reservation Index V2.1
   Exact header/data alignment + readable wrapped data rows.
   ========================================================= */
#tfhTransportIndexScreen {
  --tfh-transport-index-columns:
    92px 150px 170px 105px 105px 90px 155px 105px
    190px 210px 88px 88px 125px 145px 105px;
  --tfh-transport-index-width: 1923px;
}

#tfhTransportIndexScreen .tfh-transport-grid-header,
#tfhTransportIndexScreen .tfh-transport-grid-row {
  width: var(--tfh-transport-index-width);
  min-width: var(--tfh-transport-index-width);
  max-width: var(--tfh-transport-index-width);
  grid-template-columns: var(--tfh-transport-index-columns);
  column-gap: 0;
}

#tfhTransportIndexScreen .tfh-transport-grid-row {
  min-height: 0;
  align-items: stretch;
}

#tfhTransportIndexScreen .tfh-transport-grid-row .tfh-grid-cell {
  min-width: 0;
  display: block;
  align-self: stretch;
  overflow: visible;
  padding: 6px 7px;
  color: #21374c;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12pt;
  line-height: 1.22;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-overflow: clip;
  vertical-align: top;
}

#tfhTransportIndexScreen .tfh-transport-grid-row .tfh-grid-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

#tfhTransportIndexScreen .tfh-transport-grid-row .tfh-index-status {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}


/* Reservation Index approved grid standard propagated from Transport V2.1 */
.tfh-hotel-index-scroll, .tfh-flight-index-scroll { min-height:0; overflow:auto; padding:0; background:#fff; scrollbar-width:thin; }
.tfh-hotel-grid-header, .tfh-hotel-grid-row { width:max(100%,1660px); min-width:1660px; grid-template-columns:92px 150px 170px 105px 105px minmax(230px,1.45fr) 78px 120px minmax(230px,1.45fr) 125px 145px 105px; }
.tfh-flight-grid-header, .tfh-flight-grid-row { width:max(100%,1780px); min-width:1780px; grid-template-columns:92px 155px 170px 135px 135px 120px 120px 115px 100px minmax(260px,1.6fr) 125px 145px 105px; }
#tfhHotelIndexList { width:max(100%,1660px); min-width:1660px; gap:0; padding:0; }
#tfhFlightIndexList { width:max(100%,1780px); min-width:1780px; gap:0; padding:0; }
#tfhHotelIndexList .tfh-index-empty, #tfhFlightIndexList .tfh-index-empty { width:min(720px,calc(100vw - 80px)); min-height:84px; margin:18px auto; padding:14px; }
#tfhHotelIndexList .tfh-date-group, #tfhFlightIndexList .tfh-date-group { width:100%; overflow:visible; border:0; border-radius:0; }
#tfhHotelIndexList .tfh-date-group + .tfh-date-group, #tfhFlightIndexList .tfh-date-group + .tfh-date-group { border-top:1px solid rgba(17,49,84,.14); }
#tfhHotelIndexList .tfh-date-group-header, #tfhFlightIndexList .tfh-date-group-header { min-height:26px; padding:3px 8px; border-radius:0; background:linear-gradient(90deg,#174b78,#24689e); }
#tfhHotelIndexList .tfh-date-group-header strong, #tfhFlightIndexList .tfh-date-group-header strong { font-size:.66rem; }
#tfhHotelIndexList .tfh-date-group-rows, #tfhFlightIndexList .tfh-date-group-rows { gap:0; }
.tfh-hotel-grid-row, .tfh-flight-grid-row { min-height:34px; display:grid; align-items:stretch; gap:0; padding:0; border:0; border-bottom:1px solid rgba(17,49,84,.09); border-radius:0; background:#fff; }
.tfh-hotel-grid-row:hover, .tfh-flight-grid-row:hover { background:#f2f7fb; }
.tfh-hotel-grid-row.is-selected, .tfh-flight-grid-row.is-selected { background:#e2eef8; box-shadow:inset 4px 0 0 #1d5f9f; }
.tfh-hotel-grid-row .tfh-grid-cell, .tfh-flight-grid-row .tfh-grid-cell { min-width:0; display:flex; align-items:flex-start; overflow:visible; padding:5px 7px; border-right:1px solid rgba(17,49,84,.07); font-family:"Segoe UI",Arial,sans-serif; font-size:12pt; line-height:1.22; text-align:left; white-space:normal; overflow-wrap:anywhere; word-break:normal; }
.tfh-hotel-grid-row .tfh-grid-number, .tfh-flight-grid-row .tfh-grid-number { justify-content:flex-end; font-variant-numeric:tabular-nums; }
.tfh-hotel-grid-row .tfh-index-status, .tfh-flight-grid-row .tfh-index-status { align-self:flex-start; white-space:normal; }


/* [TFH-INVOICE-INDEX:APPROVED-REFINEMENT:CSS-START] */
.tfh-invoice-index-table,
.tfh-flight-invoice-index-table,
.tfh-hotel-invoice-index-table {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12pt;
}
.tfh-invoice-index-table thead th,
.tfh-flight-invoice-index-table thead th,
.tfh-hotel-invoice-index-table thead th {
  padding: 0;
  vertical-align: middle;
}
.tfh-invoice-sort-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}
.tfh-invoice-sort-button:hover, .tfh-invoice-sort-button.is-active { background: rgba(255,255,255,.10); }
.tfh-invoice-sort-arrow { min-width: 10px; font-size: 9px; line-height: 1; color: #fff; }
.tfh-invoice-index-table td,
.tfh-flight-invoice-index-table td,
.tfh-hotel-invoice-index-table td {
  height: auto;
  min-height: 39px;
  padding: 7px 8px;
  overflow: visible;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-overflow: clip;
  line-height: 1.25;
}
/* [TFH-INVOICE-INDEX:APPROVED-REFINEMENT:CSS-END] */


/* [TFH-INVOICE-INDEX:MOBILE-VERTICAL-SCROLL-FIX:CSS-START] */
@media (max-width: 720px) {
  .tfh-invoice-index-screen,
  .tfh-flight-invoice-index-screen,
  .tfh-hotel-invoice-index-screen {
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .tfh-invoice-index-body {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px;
  }

  .tfh-invoice-index-panel {
    height: auto;
    min-height: 100%;
    overflow: visible;
    grid-template-rows: auto auto auto;
  }

  .tfh-invoice-index-scroll {
    min-height: 360px;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* [TFH-INVOICE-INDEX:MOBILE-VERTICAL-SCROLL-FIX:CSS-END] */

/* [TFH-946:TFH_PASSENGER_DATABASE:MOBILE-SAVE-FIX:CSS-START] */
.tfh-passenger-footer-save {
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .tfh-passenger-footer {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
    align-items: center;
  }

  .tfh-passenger-footer .tfh-footer-status {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tfh-passenger-footer-save {
    min-height: 42px;
    padding: 0 15px;
  }
}
/* [TFH-946:TFH_PASSENGER_DATABASE:MOBILE-SAVE-FIX:CSS-END] */

/* [TFH-999:TFH_COMMON:INDEX-SORT-HINT-CSS-START] */
/* 2026-09-25: inactive sortable headers show a faint ⇅ (Transport, Flight and Hotel invoice indexes). */
.tfh-invoice-sort-button:not(.is-active) .tfh-invoice-sort-arrow {
  opacity: .45;
}
/* [TFH-999:TFH_COMMON:INDEX-SORT-HINT-CSS-END] */

/* [TFH-999:TFH_COMMON:DATE-FIELD-CSS-START] */
/* 2026-09-30: a rejected (incomplete / out-of-range) date flashes red for a moment
   while its previous value is restored - Transport, Flight and Hotel invoices. */
input[type="date"].tfh-date-invalid {
  border-color: #c0392b !important;
  background-color: #fdecea !important;
  box-shadow: 0 0 0 2px rgba(192,57,43,.20) !important;
  animation: tfh-date-shake .32s ease-in-out;
}

@keyframes tfh-date-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
/* [TFH-999:TFH_COMMON:DATE-FIELD-CSS-END] */
