/* 5.28.898 — compact header controls: hidden items release their navigation slots. */
.jmi-site-ui-panel{padding:12px 13px 14px;margin:8px 10px 10px;border:1px solid rgba(0,234,255,.35);border-radius:13px;background:rgba(10,24,35,.95);color:#eafaff;max-height:min(62vh,480px);overflow:auto;scrollbar-width:thin}
.jmi-site-ui-panel[hidden]{display:none!important}.jmi-site-ui-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:3px}.jmi-site-ui-head strong{font-size:13px;font-weight:900;color:#f4fbff}
.jmi-site-ui-head button{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:#c9e3eb;border-radius:8px;min-width:29px;height:29px;cursor:pointer}
.jmi-site-ui-panel>p{margin:6px 0 12px;font-size:11px;color:#a9bdc8;line-height:1.55}
.jmi-site-ui-all,.jmi-site-ui-option{display:flex;align-items:center;gap:10px;width:100%;min-height:39px;border:1px solid rgba(0,234,255,.22);border-radius:10px;margin:5px 0;padding:8px 11px;background:rgba(17,40,55,.86);color:#eafaff;cursor:pointer;text-align:left;font-size:12px;font-weight:800;line-height:1.35;font-family:inherit;transition:border-color .18s ease,background .18s ease}
.jmi-site-ui-all{justify-content:center;background:rgba(0,234,255,.09);color:#a6f6ff;border-color:rgba(0,234,255,.42);font-weight:900}.jmi-site-ui-all:hover,.jmi-site-ui-option:hover{border-color:#00eaff;background:rgba(0,234,255,.14)}
.jmi-site-ui-option>i{width:17px;text-align:center;color:#00eaff;font-size:15px}.jmi-site-ui-option>span{flex:1;min-width:0}.jmi-site-ui-switch{height:21px;width:37px;border-radius:14px;background:#197f91;position:relative;flex:0 0 auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}.jmi-site-ui-switch:after{content:"";position:absolute;right:3px;top:3px;width:15px;height:15px;border-radius:50%;background:#e8ffff;transition:transform .18s ease}
.jmi-site-ui-option.is-off .jmi-site-ui-switch{background:#384957}.jmi-site-ui-option.is-off .jmi-site-ui-switch:after{transform:translateX(-16px)}.jmi-site-ui-option.is-off{color:#889faa}.jmi-site-ui-all[data-mode=show]{color:#b7f5d0;border-color:rgba(82,210,138,.5)}
html.theme-light .jmi-site-ui-panel{background:rgba(255,251,244,.98);border-color:#c9af83;color:#35424c}html.theme-light .jmi-site-ui-head strong{color:#27343d}html.theme-light .jmi-site-ui-panel>p{color:#65757b}
html.theme-light .jmi-site-ui-all,html.theme-light .jmi-site-ui-option{background:#fff8ed;border-color:#d6c5a9;color:#36434a}html.theme-light .jmi-site-ui-all{background:#fff0ce;color:#745200;border-color:#c3994e}html.theme-light .jmi-site-ui-option>i{color:#a77818}html.theme-light .jmi-site-ui-option.is-off{color:#88969b}html.theme-light .jmi-site-ui-head button{color:#394b56;border-color:#cbbd9e;background:#fff5df}
/* 5.28.898: Header controls work as a compact ordered group. When one is
   switched off its <li> releases the whole slot (including margins), so the
   next visible control moves into place. Do not hide only the child icon: that
   would leave an empty button-sized gap. The footer language switch stays. */
html[data-jmi-site-ui-language="off"] #CssMenu1 > li.nav-language,
html[data-jmi-site-ui-theme="off"] #CssMenu1 > li.nav-theme,
html[data-jmi-site-ui-anim="off"] #CssMenu1 > li.nav-anim-bg,
html[data-jmi-site-ui-pin="off"] #CssMenu1 > li.nav-pin-header,
html[data-jmi-site-ui-clock="off"] #CssMenu1 > li.nav-live-clock{
  display:none!important;
}
/* Upcoming releases are a separate fixed rail: do not destroy its saved
   position, content or state when toggled from the site appearance menu. */
html[data-jmi-site-ui-releases="off"] .jmi-gr{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
@media(max-width:700px){.jmi-site-ui-panel{margin:7px 8px;max-height:55dvh}.jmi-site-ui-option{min-height:42px}}

/* 5.28.909: optional clock parts. Keep the parent clock visible unless the
   original complete-clock toggle is disabled; no extra backend work. */
html[data-jmi-site-ui-seconds="off"] #CssMenu1 .jmi-live-clock__seconds{
  display:none!important;
}
html[data-jmi-site-ui-date="off"] #CssMenu1 .jmi-live-clock__date{
  display:none!important;
}

/* 5.28.942 — small borderless gear shares the same anchored search dock.
   The search expands to the LEFT; the settings gear travels with its left edge. */
.jmi-search-dock{
  position:absolute;right:24px;top:100%;margin-top:6px;z-index:1;
  display:flex;flex-direction:row;align-items:center;gap:6px;
  width:max-content;max-width:calc(100vw - 24px);box-sizing:border-box;
}
.jmi-search-dock > .gs-hang{
  position:relative;top:auto;right:auto;margin:0;flex:0 0 auto;
}
.jmi-search-ui-wrap{position:relative;flex:0 0 28px;width:28px;z-index:3}
/* No tile, border, glow or background: a small standalone cog only. */
.jmi-search-ui-trigger{
  appearance:none;-webkit-appearance:none;display:grid;place-items:center;
  width:28px;height:32px;min-width:0;min-height:0;padding:0;margin:0;
  border:0!important;border-radius:0;background:transparent!important;
  box-shadow:none!important;filter:none;cursor:pointer;
  color:#79f5ff;font-size:15px;line-height:1;
  transition:color .25s ease;
}
.jmi-search-ui-trigger:hover,.jmi-search-ui-trigger.is-on{
  color:#d0fcff;background:transparent!important;box-shadow:none!important;
}
.jmi-search-ui-trigger i{font-size:15px;line-height:1;transition:transform .35s ease}
.jmi-search-ui-trigger:hover i{transform:rotate(35deg)}
.jmi-search-ui-trigger:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:3px}
/* No second settings implementation: only a second view of the shared toggles. */
.jmi-search-ui-wrap > .jmi-site-ui-panel{
  position:absolute;top:calc(100% + 9px);right:0;z-index:80;
  width:min(382px,calc(100vw - 20px));max-height:min(70vh,560px);
  margin:0;padding:12px 13px 14px;
  box-shadow:0 18px 46px rgba(0,0,0,.55),0 0 20px rgba(0,234,255,.10);
}
.jmi-search-ui-wrap > .jmi-site-ui-panel:not([hidden]){display:block}
html.theme-light .jmi-search-ui-trigger{color:#825600;background:transparent!important;border:0!important;box-shadow:none!important}
html.theme-light .jmi-search-ui-trigger:hover,html.theme-light .jmi-search-ui-trigger.is-on{color:#664100;background:transparent!important;box-shadow:none!important}
/* The new owner arrow option only changes the overlay, never server rows. */
html[data-jmi-site-ui-owner="off"] .jmi-monitor-owner-arrow{display:none!important;visibility:hidden!important;pointer-events:none!important}
@media(min-width:901px) and (max-width:1500px){.jmi-search-dock{right:18px}}
@media(min-width:901px) and (max-width:1200px){.jmi-search-dock{right:16px}}
@media(max-width:900px){
  .jmi-search-dock{position:relative;top:auto;right:auto;margin:8px 10px 2px;
    width:calc(100% - 20px);max-width:none;align-items:center;gap:6px}
  .jmi-search-dock > .gs-hang{position:relative;flex:1 1 auto;min-width:0;
    width:auto;max-width:none;margin:0;padding:0}
  .jmi-search-ui-wrap{flex-basis:28px}
  .jmi-search-ui-trigger{height:32px;width:28px}
  .jmi-search-ui-wrap > .jmi-site-ui-panel{left:0;right:auto;max-height:min(70dvh,560px)}
}
@media(prefers-reduced-motion:reduce){.jmi-search-ui-trigger,.jmi-search-ui-trigger i{transition:none!important}}
