/* UIUX-02T.11 — Booking workspace legacy visual familiarity (prototype only)
   Teal section identity + pale-yellow utility actions + icon+text chrome.
   Layout/workflow unchanged — visual hierarchy pass only. */

.booking-workspace .btn.has-ico,
.booking-workspace .ops-seg button.has-ico {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.booking-workspace .btn-ico,
.booking-workspace .section-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  line-height: 0;
}
.booking-workspace .section-ico .ui-icon {
  width: 1.1em;
  height: 1.1em;
}

/* —— Teal section identity —— */
.booking-workspace .guest-panel > .panel-hd.legacy-section-hd {
  background: linear-gradient(180deg, var(--legacy-teal) 0%, var(--legacy-teal-dark) 100%);
  color: #fff;
  border-bottom-color: var(--legacy-teal-dark);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.booking-workspace .legacy-subsection {
  border-color: var(--legacy-teal-border);
  overflow: hidden;
}
.booking-workspace .legacy-subsection-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--legacy-teal-soft);
  color: var(--legacy-teal-text);
  border-bottom: 2px solid var(--legacy-teal);
  font-weight: 600;
}
.booking-workspace .legacy-subsection-hd .section-ico {
  color: var(--legacy-teal-dark);
}
.booking-workspace .acc-parties-compact.legacy-subsection-bar {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--legacy-teal-soft);
  border: 1px solid var(--legacy-teal-border);
  border-left: 4px solid var(--legacy-teal);
  border-radius: var(--radius-sm);
  color: var(--legacy-teal-text);
  font-weight: 500;
}
.booking-workspace .acc-parties-compact.legacy-subsection-bar .btn {
  flex-shrink: 0;
}
.booking-workspace .acc-parties-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* —— Work-context seg + top trail —— */
.booking-workspace .ops-bar-booking {
  background: linear-gradient(180deg, #fff 0%, var(--legacy-teal-soft) 100%);
  border-color: var(--legacy-teal-border);
}
.booking-workspace .ops-seg {
  border-color: var(--legacy-teal-border);
}
.booking-workspace .ops-seg button {
  font-weight: 500;
}
.booking-workspace .ops-seg button.active {
  background: var(--legacy-teal);
  color: #fff;
}

/* UIUX-02T.12 — Top trail: Incoming Transfers + Data Entry Until + Exit */
.booking-workspace .ops-trail-legacy {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
}
.booking-workspace .ops-teal-btn {
  background: linear-gradient(180deg, var(--legacy-teal) 0%, var(--legacy-teal-dark) 100%);
  border: 1px solid var(--legacy-teal-dark);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  min-height: calc(var(--control-height) + 10px);
  padding-left: 12px;
  padding-right: 12px;
  align-self: stretch;
}
.booking-workspace .ops-teal-btn:hover {
  filter: brightness(1.06);
  background: linear-gradient(180deg, var(--legacy-teal) 0%, var(--legacy-teal-dark) 100%);
  color: #fff;
}
.booking-workspace .ops-data-entry-until {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 116px;
  padding: 4px 12px 5px;
  background: var(--legacy-teal-soft);
  border: 2px solid var(--legacy-teal);
  border-radius: var(--radius-sm);
  color: var(--legacy-teal-text);
  text-align: center;
  line-height: 1.15;
  align-self: stretch;
}
.booking-workspace .ops-deu-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.booking-workspace .ops-deu-date {
  margin-top: 2px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.booking-workspace .ops-exit-btn {
  background: #fff;
  border: 1px solid var(--legacy-teal-border);
  color: var(--legacy-teal-dark);
  font-weight: 600;
  min-height: calc(var(--control-height) + 10px);
  padding-left: 12px;
  padding-right: 12px;
  align-self: stretch;
  text-decoration: none;
}
.booking-workspace .ops-exit-btn:hover {
  background: var(--legacy-teal-soft);
  text-decoration: none;
  color: var(--legacy-teal-dark);
}

/* Stack layout — flex display only on mobile when sheet is open (UIUX-02T.12 correction) */
.booking-workspace .ops-trail-stack {
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.booking-workspace .ops-trail-stack .ops-teal-btn,
.booking-workspace .ops-trail-stack .ops-exit-btn {
  width: 100%;
  justify-content: center;
  min-height: var(--touch-min);
}
.booking-workspace .ops-trail-stack .ops-data-entry-until {
  width: 100%;
  min-height: var(--touch-min);
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Desktop: compact trail only — suppress mobile sheet/stack (beats app.css .ops-more-sheet display:flex) */
.booking-workspace .ops-trail-legacy.desktop-only {
  display: flex;
}
.booking-workspace .ops-more-sheet.mobile-only,
.booking-workspace .ops-more-sheet[hidden] {
  display: none !important;
}

.booking-workspace .ops-bar-trail .btn-utility,
.booking-workspace .ops-more-sheet .btn-utility {
  min-height: var(--control-height);
}

/* —— Service tabs —— */
.booking-workspace .service-panel {
  border-color: var(--legacy-teal-border);
}
.booking-workspace .tabs-services {
  margin-bottom: 0;
  padding: 4px 6px 0;
  gap: 3px;
  background: var(--legacy-teal-soft);
  border-bottom: 2px solid var(--legacy-teal-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.booking-workspace .tabs-services .tab {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid transparent;
  border-bottom: 0;
  max-width: 10rem;
  color: var(--legacy-teal-text);
}
.booking-workspace .tabs-services .tab:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--legacy-teal-dark);
}
.booking-workspace .tabs-services .tab.active {
  background: #fff;
  color: var(--legacy-teal-dark);
  border-color: var(--legacy-teal-border);
  border-bottom: 2px solid var(--legacy-teal);
  font-weight: 600;
}
.booking-workspace .tabs-services .tab.active .tab-count {
  background: var(--legacy-teal-soft);
  color: var(--legacy-teal-dark);
}
.booking-workspace .service-panel > .panel-bd {
  border-top: 0;
}

/* —— Pale-yellow utility actions —— */
.btn-utility {
  background: var(--legacy-utility-bg);
  border-color: var(--legacy-utility-border);
  color: var(--legacy-utility-text);
}
.btn-utility:hover {
  background: var(--legacy-utility-hover);
  border-color: #dcc56a;
  color: var(--legacy-utility-text);
}
.booking-workspace .xfer-toolbar {
  margin-bottom: 8px;
  gap: 8px;
}

/* —— Bottom action bar —— */
.booking-workspace .actionbar-booking {
  background: linear-gradient(180deg, #fafbfc 0%, #f3f8f8 100%);
  border-color: var(--legacy-teal-border);
  border-top: 2px solid var(--legacy-teal-border);
  box-shadow: 0 -4px 16px rgba(14, 154, 154, 0.08);
}
.booking-workspace .actionbar-mobile-flow {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.booking-workspace .actionbar-mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.booking-workspace .actionbar-mobile-grid .btn {
  width: 100%;
  justify-content: center;
}
.booking-workspace .actionbar-mobile-grid .btn-danger-outline {
  grid-column: 1 / -1;
}
.booking-workspace .actionbar-mobile-save {
  width: 100%;
  justify-content: center;
  font-weight: 600;
}
.booking-workspace .actionbar-booking .btn-danger-outline {
  background: var(--danger-bg);
}
.booking-workspace .actionbar-booking .btn-primary.has-ico {
  font-weight: 600;
}

/* Transfer modal footer (opened from booking) */
.modal-ft .btn-utility { background: var(--legacy-utility-bg); border-color: var(--legacy-utility-border); color: var(--legacy-utility-text); }
.modal-ft .btn-utility:hover { background: var(--legacy-utility-hover); }
.modal-ft .btn.has-ico { display: inline-flex; align-items: center; gap: 6px; }
.modal-ft .btn-ico { display: inline-flex; width: 1.05em; height: 1.05em; flex-shrink: 0; }

@media (max-width: 767.98px) {
  .booking-workspace .ops-trail-legacy.desktop-only {
    display: none !important;
  }
  .booking-workspace .ops-more-sheet.mobile-only:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
  }
  .booking-workspace .tabs-services {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .booking-workspace .tabs-services .tab {
    flex: 0 0 auto;
    max-width: none;
    min-height: var(--touch-min);
  }
  .booking-workspace .actionbar-booking {
    position: static;
    bottom: auto;
    z-index: auto;
    flex-direction: column;
    align-items: stretch;
    box-shadow: none;
    margin-top: 8px;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }
  .booking-workspace .actionbar-mobile-flow {
    display: flex;
  }
  .booking-workspace .actionbar-booking .btn.has-ico .btn-label-wrap {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

html.force-mobile .booking-workspace .ops-trail-legacy.desktop-only {
  display: none !important;
}
html.force-mobile .booking-workspace .ops-more-sheet.mobile-only:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}
html.force-mobile .booking-workspace .tabs-services {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
html.force-mobile .booking-workspace .tabs-services .tab {
  flex: 0 0 auto;
  max-width: none;
  min-height: var(--touch-min);
}
html.force-mobile .booking-workspace .actionbar-booking {
  position: static;
  bottom: auto;
  z-index: auto;
  flex-direction: column;
  align-items: stretch;
  box-shadow: none;
  margin-top: 8px;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
}
html.force-mobile .booking-workspace .actionbar-mobile-flow {
  display: flex;
}
html.force-mobile .booking-workspace .actionbar-booking .btn.has-ico .btn-label-wrap {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* UIUX-02T.13 — Transfer Bookings operations list */
.tb-bookings-page .tb-page-head h1 {
  color: var(--legacy-teal-dark);
}
.tb-bookings-page .tb-toolbar {
  border-color: var(--legacy-teal-border);
  background: linear-gradient(180deg, #fff 0%, var(--legacy-teal-soft) 100%);
}
.tb-ops-table-wrap {
  border-color: var(--legacy-teal-border);
}
.tb-ops-table thead th {
  background: var(--legacy-teal-soft);
  color: var(--legacy-teal-text);
  font-size: var(--fs-label);
  font-weight: 600;
  border-bottom: 2px solid var(--legacy-teal);
  white-space: nowrap;
}
.tb-ops-table tbody tr.tb-booking-row {
  cursor: pointer;
  height: auto;
}
.tb-ops-table tbody tr.tb-booking-row:hover {
  background: var(--legacy-teal-soft);
}
.tb-ops-table tbody tr.tb-booking-row:focus-visible {
  outline: 2px solid var(--legacy-teal);
  outline-offset: -2px;
}
.tb-ops-table td {
  white-space: normal;
  vertical-align: top;
  padding-top: 8px;
  padding-bottom: 8px;
}
.tb-primary {
  font-weight: 600;
  line-height: 1.25;
}
.tb-secondary {
  font-size: var(--fs-meta);
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}
.tb-col-arr, .tb-col-no { white-space: nowrap; }
.tb-col-pax, .tb-col-ht, .tb-col-tf, .tb-col-ex {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tb-col-hotel .tb-primary {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-col-guest .tb-primary {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-table-foot {
  color: var(--text-secondary);
  font-size: var(--fs-label);
}
.tb-booking-card .tb-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.tb-booking-card .tb-card-meta span {
  line-height: 1.35;
}
.tb-bookings-page .btn.has-ico {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 767.98px) {
  .tb-bookings-page .tb-page-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tb-bookings-page .tb-page-head .btn-primary {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* UIUX-TB — mobile booking workspace width contract (Transfer #transfer-booking-edit)
   Root cause: grid/flex children default min-width:auto lets guest-panel / kv-grid /
   legacy-subsection min-content (~549px) exceed the available main column (~416px at 440px
   viewport), forcing horizontal overflow and a visually narrow workspace strip. */
@media (max-width: 767.98px) {
  .booking-workspace,
  .booking-workspace .booking-split,
  .booking-workspace .booking-split > .panel,
  .booking-workspace .panel-bd,
  .booking-workspace .legacy-subsection,
  .booking-workspace .kv-grid,
  .booking-workspace .arrdep-grid,
  .booking-workspace .form-grid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .booking-workspace .booking-split {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .booking-workspace .guest-dense.kv-grid {
    grid-template-columns: minmax(72px, 34%) minmax(0, 1fr);
    width: 100%;
  }
  .booking-workspace .guest-dense .k,
  .booking-workspace .guest-dense .v {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

html.force-mobile .booking-workspace,
html.force-mobile .booking-workspace .booking-split,
html.force-mobile .booking-workspace .booking-split > .panel,
html.force-mobile .booking-workspace .panel-bd,
html.force-mobile .booking-workspace .legacy-subsection,
html.force-mobile .booking-workspace .kv-grid,
html.force-mobile .booking-workspace .arrdep-grid,
html.force-mobile .booking-workspace .form-grid {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
html.force-mobile .booking-workspace .booking-split {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100%;
}
html.force-mobile .booking-workspace .guest-dense.kv-grid {
  grid-template-columns: minmax(72px, 34%) minmax(0, 1fr) !important;
  width: 100%;
}
html.force-mobile .booking-workspace .guest-dense .k,
html.force-mobile .booking-workspace .guest-dense .v {
  min-width: 0;
  overflow-wrap: anywhere;
}
