/* FRCH compact controls and light-blue workspace refinement.
   Scoped to Reservation Workspace and internal overlays only. */

/* Light mode: replace the green-sage cast with a softer, ~15% lighter blue tone. */
html:not([data-theme="dark"]) .reservation-workspace-open .drawer-head,
html:not([data-theme="dark"]) .reservation-workspace-open .rw-toolbar{
  background:#f4f9fc!important;
}
html:not([data-theme="dark"]) .reservation-workspace-open .drawer-content,
html:not([data-theme="dark"]) .reservation-workspace-open .rw-workspace{
  background:#e8f2f7!important;
}
html:not([data-theme="dark"]) .reservation-workspace-open .rw-section,
html:not([data-theme="dark"]) .reservation-workspace-open .rw-reservation-summary{
  background:#fbfdfe!important;
}

/* Keep Rental controls compact and aligned where the displayed value lives. */
.reservation-workspace-open .rw-rental-section .rw-field{
  grid-template-columns:minmax(170px,1fr) minmax(230px,330px)!important;
  column-gap:18px!important;
}
.reservation-workspace-open .rw-rental-section .rw-field>input,
.reservation-workspace-open .rw-rental-section .rw-field>select,
.reservation-workspace-open .rw-rental-section .rw-change-row{
  width:100%!important;
  max-width:330px!important;
  justify-self:end!important;
}
.reservation-workspace-open .rw-rental-section .rw-change-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
}
.reservation-workspace-open .rw-rental-section .rw-current-vehicle{
  width:auto!important;
  min-width:0!important;
}

/* Native select is visually replaced only for Rental Category; it remains the source of truth. */
.rw-category-enhanced{
  position:relative;
  width:100%;
  max-width:330px;
  justify-self:end;
}
.rw-category-enhanced>select{
  position:absolute!important;
  inset:0!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
.rw-category-trigger{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 11px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:400;
  text-align:right;
  cursor:pointer;
}
.rw-category-trigger:hover,
.rw-category-enhanced.is-open .rw-category-trigger{
  border-color:rgba(76,129,164,.35);
  background:rgba(83,144,183,.055);
}
.rw-category-trigger::after{
  content:"⌄";
  flex:0 0 auto;
  color:#5e7d8d;
  font-size:14px;
  line-height:1;
}
.rw-category-menu{
  position:absolute;
  z-index:90;
  top:calc(100% + 6px);
  right:0;
  width:100%;
  max-height:300px;
  overflow:auto;
  padding:6px;
  border:1px solid #cbdce5;
  border-radius:12px;
  background:#fbfdfe;
  box-shadow:0 16px 36px rgba(35,66,82,.16);
}
.rw-category-menu.hidden{display:none}
.rw-category-option{
  width:100%;
  display:block;
  border:0;
  border-radius:8px;
  padding:8px 10px;
  background:transparent;
  color:#233943;
  font:inherit;
  font-weight:400;
  text-align:right;
  cursor:pointer;
}
.rw-category-option:hover,
.rw-category-option.is-selected{
  background:#e9f3f8;
  color:#163f55;
}

/* Team Notes should read as internal notes, not another neutral card. */
.reservation-workspace-open .rw-note{
  border-left:3px solid #d49b3d!important;
  background:#fff7df!important;
  color:#5f4a22!important;
  border-radius:0 10px 10px 0!important;
  padding:10px 12px!important;
}
.reservation-workspace-open .rw-note-head time{color:#8b754d!important}
html[data-theme="dark"] .reservation-workspace-open .rw-note{
  border-left-color:#d7a24b!important;
  background:#2a2418!important;
  color:#f1dfb8!important;
}
html[data-theme="dark"] .reservation-workspace-open .rw-note-head time{color:#bca779!important}

/* Extras + Invoices overlays follow the same blue family in light mode. */
html:not([data-theme="dark"]) .extras-overlay-panel,
html:not([data-theme="dark"]) .invoices-overlay-panel{
  background:#edf6fa!important;
  border-color:#cadde7!important;
}
html:not([data-theme="dark"]) .extras-overlay-panel .xo-head,
html:not([data-theme="dark"]) .invoices-overlay-panel .io-head{background:#f7fbfd!important}
html:not([data-theme="dark"]) .extras-overlay-panel .xo-section,
html:not([data-theme="dark"]) .invoices-overlay-panel .invoice-card,
html:not([data-theme="dark"]) .invoices-overlay-panel .invoice-summary-box{background:#fbfdfe!important}

/* Real checkbox remains the primary hit target; row/text are secondary hit targets. */
.extras-overlay-panel .xo-tax-check{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  position:relative!important;
  z-index:2!important;
}
.extras-overlay-panel .xo-tax-row{cursor:pointer!important}

html[data-theme="dark"] .rw-category-menu{
  background:#15272f;
  border-color:#3a515c;
  box-shadow:0 18px 38px rgba(0,0,0,.34);
}
html[data-theme="dark"] .rw-category-option{color:#edf4f1}
html[data-theme="dark"] .rw-category-option:hover,
html[data-theme="dark"] .rw-category-option.is-selected{
  background:#1d3641;
  color:#fff;
}
html[data-theme="dark"] .rw-category-trigger::after{color:#9db2bd}

@media(max-width:900px){
  .reservation-workspace-open .rw-rental-section .rw-field{
    grid-template-columns:145px minmax(200px,300px)!important;
  }
  .reservation-workspace-open .rw-rental-section .rw-field>input,
  .reservation-workspace-open .rw-rental-section .rw-field>select,
  .reservation-workspace-open .rw-rental-section .rw-change-row,
  .rw-category-enhanced{max-width:300px!important}
}
@media(max-width:720px){
  .reservation-workspace-open .rw-rental-section .rw-field{
    grid-template-columns:1fr!important;
    gap:5px!important;
  }
  .reservation-workspace-open .rw-rental-section .rw-field>input,
  .reservation-workspace-open .rw-rental-section .rw-field>select,
  .reservation-workspace-open .rw-rental-section .rw-change-row,
  .rw-category-enhanced{
    width:100%!important;
    max-width:none!important;
  }
}
