/* THRS V14.33 — Work Schedules Department picker ONLY.
   Keeps filter order, dimensions and departmentId contract. Portal popup prevents
   the existing overflow-hidden THRS Card from cropping the dropdown. */
html[data-theme="light"]{
  --wsd-bg:#ffffff;--wsd-soft:#f5f8fc;--wsd-soft2:#eaf1f8;
  --wsd-ink:#14314d;--wsd-muted:#617a91;--wsd-line:#d9e5ee;
  --wsd-gold:#b88743;--wsd-goldwash:#fff5e7;
  --wsd-shadow:0 16px 44px rgba(8,39,66,.18),0 3px 10px rgba(8,39,66,.08);
}
html[data-theme="dark"]{
  --wsd-bg:#15344d;--wsd-soft:#1d3c55;--wsd-soft2:#294861;
  --wsd-ink:#f1f7ff;--wsd-muted:#bdcede;--wsd-line:#3a5b73;
  --wsd-gold:#edc78d;--wsd-goldwash:#3b453f;
  --wsd-shadow:0 19px 52px rgba(0,8,24,.48),0 5px 14px rgba(0,8,24,.22);
}
html[data-theme] .work-schedules-pro .ws-dept-control{
  position:relative;display:block;min-width:0;
}
html[data-theme] .work-schedules-pro button.ws-dept-trigger.ws-field{
  width:100%;min-width:0;min-height:40px;height:40px;
  display:flex;align-items:center;gap:9px;
  border:1px solid var(--wsd-line) !important;
  border-radius:11px !important;
  background:linear-gradient(145deg,var(--wsd-bg),var(--wsd-soft)) !important;
  box-shadow:0 2px 8px rgba(12,43,72,.042),inset 0 1px 0 rgba(255,255,255,.16) !important;
  padding:0 12px !important;
  color:var(--wsd-ink) !important;
  -webkit-text-fill-color:var(--wsd-ink) !important;
  font:inherit;font-size:12px;font-weight:770 !important;
  text-align:start;cursor:pointer;
  transition:background .18s,border-color .18s,box-shadow .18s !important;
}
html[data-theme] .work-schedules-pro button.ws-dept-trigger.ws-field:hover,
html[data-theme] .work-schedules-pro button.ws-dept-trigger.ws-field.is-open{
  border-color:var(--wsd-gold) !important;
  background:var(--wsd-bg) !important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--wsd-gold) 11%,transparent),0 3px 12px rgba(12,43,72,.055) !important;
}
html[data-theme] .work-schedules-pro button.ws-dept-trigger.ws-field:focus-visible{
  outline:2px solid var(--wsd-gold) !important;outline-offset:2px !important;
}
html[data-theme] .work-schedules-pro .ws-dept-symbol{
  display:grid;place-items:center;
  width:24px;height:24px;flex:0 0 24px;
  background:color-mix(in srgb,var(--wsd-gold) 12%,var(--wsd-bg));
  border-radius:8px;
  color:var(--wsd-gold);
}
html[data-theme] .work-schedules-pro .ws-dept-current{
  min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  line-height:1.3;font-weight:770;
}
html[data-theme] .work-schedules-pro .ws-dept-chevron{
  flex:0 0 auto;color:var(--wsd-gold);
  transition:transform .16s ease;
}
html[data-theme] .work-schedules-pro button.ws-dept-trigger.is-open .ws-dept-chevron{transform:rotate(180deg)}
/* Portal-based dropdown. Same colors in both document modes. */
html[data-theme] .ws-dept-popover{
  box-sizing:border-box;display:flex;flex-direction:column;
  min-width:0;overflow:hidden;
  border:1px solid color-mix(in srgb,var(--wsd-gold) 30%,var(--wsd-line));
  border-radius:15px;
  background:var(--wsd-bg);color:var(--wsd-ink);
  box-shadow:var(--wsd-shadow);
  padding:7px;
  font-family:inherit;
  animation:wsd-enter .14s ease-out;
}
@keyframes wsd-enter{from{opacity:.5;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
html[data-theme] .ws-dept-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;flex:0 0 auto;
  padding:8px 9px 9px;
  border-bottom:1px solid var(--wsd-line);
}
html[data-theme] .ws-dept-head strong{
  color:var(--wsd-ink);font-size:12px;font-weight:850;line-height:1.35;
}
html[data-theme] .ws-dept-head span{
  font-size:10px;font-weight:760;white-space:nowrap;
  border:1px solid var(--wsd-line);
  border-radius:99px;padding:4px 8px;
  color:var(--wsd-muted);background:var(--wsd-soft);
}
html[data-theme] .ws-dept-search{
  margin:9px 5px 5px;
  min-height:39px;flex:0 0 39px;
  padding:0 10px;
  display:flex;align-items:center;gap:9px;
  border:1px solid var(--wsd-line);
  background:var(--wsd-soft);
  border-radius:10px;color:var(--wsd-muted);
}
html[data-theme] .ws-dept-search:focus-within{
  border-color:var(--wsd-gold);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--wsd-gold) 12%,transparent);
}
html[data-theme] .ws-dept-search input{
  flex:1;min-width:0;height:35px;
  padding:0 !important;margin:0 !important;
  border:0 !important;outline:0 !important;box-shadow:none !important;
  background:transparent !important;color:var(--wsd-ink) !important;
  -webkit-text-fill-color:var(--wsd-ink) !important;
  font-family:inherit;font-size:11.5px;font-weight:650;
}
html[data-theme] .ws-dept-search input::placeholder{
  color:var(--wsd-muted);-webkit-text-fill-color:var(--wsd-muted);opacity:.85;
}
html[data-theme] .ws-dept-options{
  flex:1 1 auto;min-height:0;
  overflow-y:auto;overscroll-behavior:contain;
  display:flex;flex-direction:column;gap:3px;
  padding:3px 2px 2px;
  scrollbar-width:thin;scrollbar-color:var(--wsd-gold) transparent;
}
html[data-theme] .ws-dept-option{
  box-sizing:border-box;
  width:100%;min-height:41px;
  padding:7px 9px;flex:0 0 auto;
  display:flex;align-items:center;gap:9px;
  border:1px solid transparent;border-radius:10px;
  background:transparent;color:var(--wsd-ink);
  font:inherit;font-size:11.5px;font-weight:720;
  text-align:start;cursor:pointer;
}
html[data-theme] .ws-dept-option:hover,
html[data-theme] .ws-dept-option.is-keyboard{
  background:var(--wsd-soft);border-color:var(--wsd-line);
}
html[data-theme] .ws-dept-option.is-selected{
  color:var(--wsd-ink);
  background:color-mix(in srgb,var(--wsd-gold) 12%,var(--wsd-bg));
  border-color:color-mix(in srgb,var(--wsd-gold) 35%,var(--wsd-line));
  font-weight:850;
}
html[data-theme] .ws-dept-option:focus-visible{
  outline:2px solid var(--wsd-gold);outline-offset:-2px;
}
html[data-theme] .ws-dept-option-icon{
  display:grid;place-items:center;
  flex:0 0 27px;width:27px;height:27px;
  border-radius:8px;
  background:var(--wsd-soft2);
  color:var(--wsd-muted);
}
html[data-theme] .ws-dept-option.is-selected .ws-dept-option-icon{
  color:var(--wsd-gold);
  background:color-mix(in srgb,var(--wsd-gold) 16%,var(--wsd-bg));
}
html[data-theme] .ws-dept-option-text{
  flex:1;min-width:0;line-height:1.35;
  overflow-wrap:anywhere;
}
html[data-theme] .ws-dept-check{flex:0 0 auto;color:var(--wsd-gold)}
html[data-theme] .ws-dept-empty{
  padding:24px 8px;text-align:center;
  color:var(--wsd-muted);font-size:12px;font-weight:670;
}
@media(max-width:560px){
  html[data-theme] .ws-dept-popover{border-radius:13px;padding:6px}
  html[data-theme] .ws-dept-option{min-height:44px}
}
@media(prefers-reduced-motion:reduce){
  html[data-theme] .ws-dept-popover{animation:none}
  html[data-theme] .work-schedules-pro .ws-dept-chevron{transition:none}
}
