/* THRS V14.17 — Overtime Premium Open Dropdown Menus
   Scoped controls and portal menus. Original React selects remain in DOM.
   JS enhancements affect no other THRS routes. */
html[data-theme="light"] :is(.thrs-page-overtime-management,.thrs-ot-select-popup) {
 --ot17-bg:#ffffff;--ot17-raised:#f6f9fd;--ot17-hover:#edf4fa;
 --ot17-ink:#15324e;--ot17-muted:#536a82;--ot17-border:#cfdde9;
 --ot17-gold:#a77431;--ot17-strong:#b9863c;
 --ot17-shadow:0 23px 53px rgba(9,34,61,.18),0 4px 10px rgba(9,34,61,.05);
 --ot17-ring:0 0 0 3px rgba(184,134,65,.20);
 color-scheme:light;
}
html[data-theme="dark"] :is(.thrs-page-overtime-management,.thrs-ot-select-popup) {
 --ot17-bg:#142f49;--ot17-raised:#1b3b58;--ot17-hover:#244b69;
 --ot17-ink:#f0f7ff;--ot17-muted:#c3d4e4;--ot17-border:#54748e;
 --ot17-gold:#f0cd91;--ot17-strong:#efc781;
 --ot17-shadow:0 23px 54px rgba(0,6,19,.59),inset 0 1px 0 rgba(255,255,255,.07);
 --ot17-ring:0 0 0 3px rgba(233,190,124,.24);
 color-scheme:dark;
}
/* Keep React select as the source of truth, visually concealed only after
   the new, functional button has been added. Do not display:none the native
   required employee select: it must remain validatable by the browser. */
html[data-theme] .thrs-page-overtime-management select.thrs-ot-select-native,
html[data-theme] body:has(.thrs-page-overtime-management) .thrs-modal-card select.thrs-ot-select-native {
 position:absolute !important;
 width:1px !important;min-width:1px !important;max-width:1px !important;
 height:1px !important;min-height:1px !important;
 padding:0 !important;margin:0 !important;
 opacity:0 !important;clip-path:inset(50%) !important;
 pointer-events:none !important;
 overflow:hidden !important;
 border:0 !important;box-shadow:none !important;
}
html[data-theme] .thrs-page-overtime-management .thrs-ot-select-trigger,
html[data-theme] body:has(.thrs-page-overtime-management) .thrs-modal-card .thrs-ot-select-trigger {
 display:flex !important;
 align-items:center !important;
 justify-content:space-between !important;
 width:100% !important;min-width:0 !important;
 min-height:40px !important;
 padding:7px 10px 7px 13px !important;
 gap:11px !important;
 background:linear-gradient(130deg,var(--ot17-bg),var(--ot17-raised)) !important;
 color:var(--ot17-ink) !important;
 border:1px solid var(--ot17-border) !important;
 border-radius:11px !important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 2px 8px rgba(8,36,63,.04) !important;
 font:inherit !important;font-size:12px !important;font-weight:750 !important;
 text-align:start !important;line-height:1.4 !important;cursor:pointer !important;
 transition:box-shadow .18s,border-color .18s,background .18s !important;
}
html[data-theme] .thrs-page-overtime-management .thrs-ot-select-trigger:hover,
html[data-theme] body:has(.thrs-page-overtime-management) .thrs-modal-card .thrs-ot-select-trigger:hover {
 border-color:var(--ot17-gold) !important;
 background:var(--ot17-raised) !important;
 box-shadow:0 4px 13px rgba(11,42,68,.09) !important;
}
html[data-theme] .thrs-page-overtime-management .thrs-ot-select-trigger[aria-expanded="true"],
html[data-theme] .thrs-page-overtime-management .thrs-ot-select-trigger:focus-visible,
html[data-theme] body:has(.thrs-page-overtime-management) .thrs-modal-card .thrs-ot-select-trigger[aria-expanded="true"],
html[data-theme] body:has(.thrs-page-overtime-management) .thrs-modal-card .thrs-ot-select-trigger:focus-visible {
 border-color:var(--ot17-gold) !important;
 outline:none !important;box-shadow:var(--ot17-ring) !important;
}
html[data-theme] .thrs-ot-select-trigger .thrs-premium-select-trigger__value {
 color:var(--ot17-ink) !important;
 min-width:0 !important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 font-size:12px !important;font-weight:760 !important;
}
html[data-theme] .thrs-ot-select-trigger[data-empty="true"] .thrs-premium-select-trigger__value {
 color:var(--ot17-muted) !important;
}
html[data-theme] .thrs-ot-select-trigger .thrs-premium-select-trigger__chevron {
 flex:0 0 26px !important;
 width:26px !important;height:26px !important;
 border-radius:8px !important;
 background:color-mix(in srgb,var(--ot17-gold) 11%,var(--ot17-raised)) !important;
 border:1px solid color-mix(in srgb,var(--ot17-gold) 32%,var(--ot17-border)) !important;
 color:var(--ot17-gold) !important;
}
html[data-theme] body:has(.thrs-page-overtime-management) .thrs-modal-card .thrs-ot-select-trigger {
 min-height:43px !important;
}
/* Portal listbox renders outside cards and dialogs to avoid clipping. */
html[data-theme] .thrs-ot-select-popup {
 position:fixed !important;z-index:6350 !important;
 background:linear-gradient(158deg,var(--ot17-bg),var(--ot17-raised)) !important;
 color:var(--ot17-ink) !important;
 border:1px solid color-mix(in srgb,var(--ot17-gold) 40%,var(--ot17-border)) !important;
 border-radius:16px !important;
 box-shadow:var(--ot17-shadow) !important;
 overflow:hidden !important;
 direction:inherit !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-popup__head{
 border-bottom:1px solid var(--ot17-border) !important;
 background:color-mix(in srgb,var(--ot17-gold) 4%,var(--ot17-bg)) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-popup__head strong {
 font-size:12px !important;font-weight:880 !important;
 color:var(--ot17-ink) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-popup__head span {
 background:color-mix(in srgb,var(--ot17-gold) 12%,var(--ot17-bg)) !important;
 color:var(--ot17-gold) !important;
 border-color:color-mix(in srgb,var(--ot17-gold) 37%,var(--ot17-border)) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-search {
 background:var(--ot17-bg) !important;color:var(--ot17-ink) !important;
 -webkit-text-fill-color:var(--ot17-ink) !important;
 border:1px solid var(--ot17-border) !important;
 border-radius:10px !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-search::placeholder {
 color:var(--ot17-muted) !important;
 -webkit-text-fill-color:var(--ot17-muted) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-search:focus {
 border-color:var(--ot17-gold) !important;
 box-shadow:var(--ot17-ring) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-popup__list {
 scrollbar-color:var(--ot17-gold) transparent;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-option {
 color:var(--ot17-ink) !important;
 background:transparent !important;
 border-radius:10px !important;
 border:1px solid transparent !important;
 font-size:12px !important;font-weight:700 !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-option:is(:hover,.is-highlighted,:focus-visible){
 background:var(--ot17-hover) !important;
 border-color:var(--ot17-border) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-option[aria-selected="true"]{
 background:color-mix(in srgb,var(--ot17-gold) 14%,var(--ot17-raised)) !important;
 border:1px solid color-mix(in srgb,var(--ot17-gold) 53%,var(--ot17-border)) !important;
 font-weight:900 !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-option[aria-selected="true"]::after{
 color:#122c45 !important;
 background:linear-gradient(130deg,#f9dfad,#d5a65c) !important;
 box-shadow:0 2px 7px rgba(128,83,30,.12) !important;
}
html[data-theme] .thrs-ot-select-popup .thrs-premium-select-no-results {
 color:var(--ot17-muted) !important;
}
/* Existing month chooser is already custom; make its opened state coherent. */
html[data-theme] .thrs-page-overtime-management .thrs-ot-month-trigger:is(:hover,:focus-visible,.is-open){
 border-color:var(--ov16-gold) !important;
 box-shadow:var(--ot17-ring) !important;
}
html[data-theme] .thrs-page-overtime-management .thrs-ot-month-popover {
 border-color:color-mix(in srgb,var(--ov16-gold) 45%,var(--ov16-border)) !important;
 box-shadow:var(--ot17-shadow) !important;
}
html[data-theme] .thrs-page-overtime-management .thrs-ot-month-grid button.is-selected {
 background:linear-gradient(125deg,#204c6b,#0c2c49) !important;
 color:#fff !important;
 border-color:#c39c61 !important;
}
html[data-theme] .thrs-page-overtime-management .thrs-ot-month-grid button.is-current:not(.is-selected) {
 border-color:color-mix(in srgb,var(--ov16-gold) 31%,var(--ov16-border)) !important;
}
/* Mobile full width bottom sheet with backdrop; dropdown remains keyboard-usable. */
@media(max-width:600px){
 html[data-theme] .thrs-ot-select-popup{
  border-radius:20px !important;
  max-height:min(63dvh,480px) !important;
  padding-bottom:max(10px,env(safe-area-inset-bottom,10px)) !important;
 }
 html[data-theme] .thrs-ot-select-overlay {
  z-index:6349 !important;
  background:rgba(3,17,32,.53) !important;
  backdrop-filter:blur(3px) !important;
 }
}
@media(prefers-reduced-motion:reduce) {
 html[data-theme] :is(.thrs-ot-select-trigger,.thrs-ot-select-popup,
 .thrs-ot-select-popup .thrs-premium-select-option){
  animation:none !important;transition:none !important;transform:none !important;
 }
}
