/* BMV site search — shared by the homepage (/) and the VIP page (/vip).
   Self-contained palette (dark dialog works on both pages' themes).
   No transitions by design: respects prefers-reduced-motion with zero motion. */

/* ---------- trigger button ---------- */
.bmv-search-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:44px;padding:9px 13px;border:1px solid #a6ff00;background:#07030f;color:#a6ff00;font-family:"IBM Plex Mono",monospace;font-size:.68rem;font-weight:700;letter-spacing:.09em;cursor:pointer;box-shadow:4px 4px 0 #ff2e7e}
.bmv-search-btn:hover{background:#a6ff00;color:#181103}
.bmv-search-btn:focus-visible{outline:2px solid #00e5ff;outline-offset:3px}
.bmv-search-btn[aria-expanded="true"]{background:#a6ff00;color:#181103;box-shadow:4px 4px 0 #00e5ff}
.bmv-search-btn-icon{width:16px;height:16px;flex:0 0 auto}
.bmv-search-btn-kbd{font-family:"IBM Plex Mono",monospace;font-size:.55rem;letter-spacing:.08em;padding:2px 5px;border:1px solid currentColor;opacity:.75}
/* On /vip the button sits beside SECTIONS in the fixed navigator. */
#sectionNavigator{display:flex;gap:8px;align-items:flex-start}
#sectionNavigator .section-nav-trigger{flex:0 0 auto}

/* ---------- dialog ---------- */
.bmv-search-backdrop{position:fixed;inset:0;z-index:2000;background:rgba(0,0,0,.72);overflow-y:auto;padding:12vh 12px 24px}
body.bmv-search-open{overflow:hidden}
.bmv-search-dialog{max-width:560px;margin:0 auto;background:#0d1316;border:1px solid #344044;border-top:5px solid #a6ff00;color:#edf1f2;box-shadow:0 20px 48px rgba(0,0,0,.72);font-family:"Barlow Condensed",sans-serif}
.bmv-search-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 0}
.bmv-search-head h2{margin:0;font-family:"Anton",sans-serif;font-size:1.6rem;letter-spacing:.02em;color:#fff}
.bmv-search-close{display:grid;place-items:center;width:44px;height:44px;flex:0 0 auto;background:#141c20;border:1px solid #344044;color:#fff;font-size:1rem;cursor:pointer}
.bmv-search-close:hover{border-color:#00e5ff;color:#00e5ff}
.bmv-search-close:focus-visible{outline:2px solid #00e5ff;outline-offset:2px}
.bmv-search-box{display:flex;align-items:center;gap:10px;margin:12px 16px 0;padding:0 12px;background:#080c0e;border:1px solid #344044}
.bmv-search-box:focus-within{border-color:#00e5ff;box-shadow:0 0 0 2px #00e5ff}
.bmv-search-icon{width:20px;height:20px;flex:0 0 auto;color:#a6ff00}
.bmv-search-input{flex:1;min-width:0;background:transparent;border:0;color:#fff;font-family:inherit;font-size:1.15rem;font-weight:600;padding:13px 0;outline:none}
.bmv-search-input::placeholder{color:#7d8a8d}
.bmv-search-input::-webkit-search-cancel-button{-webkit-appearance:none}
.bmv-search-esc{font-family:"IBM Plex Mono",monospace;font-size:.6rem;letter-spacing:.08em;color:#aeb9bb;padding:3px 6px;border:1px solid #344044}
.bmv-search-hint{margin:8px 16px 0;color:#aeb9bb;font-family:"IBM Plex Mono",monospace;font-size:.62rem;letter-spacing:.05em}
.bmv-search-results{list-style:none;margin:12px 0 0;padding:0;max-height:340px;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid #273236;scrollbar-color:#a6ff00 #0d1316}
.bmv-search-option{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;padding:10px 16px;border-bottom:1px solid #273236;cursor:pointer}
.bmv-search-option:last-child{border-bottom:0}
.bmv-search-option.is-active{background:#152026;box-shadow:inset 4px 0 0 #ff2e7e}
.bmv-search-opt-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.bmv-search-opt-name{font-size:1.12rem;font-weight:800;letter-spacing:.02em;color:#fff}
.bmv-search-opt-desc{font-size:.92rem;color:#aeb9bb;line-height:1.3}
.bmv-search-opt-tag{flex:0 0 auto;font-family:"IBM Plex Mono",monospace;font-size:.58rem;font-weight:700;letter-spacing:.1em;padding:3px 7px;border:1px solid currentColor}
.bmv-search-opt-tag--free{color:#00e5ff}
.bmv-search-opt-tag--vip{color:#a6ff00}
.bmv-search-empty{padding:18px 16px;color:#dce2e3;line-height:1.5}
.bmv-search-status{margin:0;padding:10px 16px;border-top:1px solid #273236;color:#00e5ff;font-family:"IBM Plex Mono",monospace;font-size:.62rem;letter-spacing:.08em}

@media (max-width:520px){
  .bmv-search-backdrop{padding-top:8vh}
  .bmv-search-btn-kbd{display:none}
  .bmv-search-head h2{font-size:1.4rem}
  .bmv-search-results{max-height:52vh}
  #sectionNavigator{flex-wrap:wrap;justify-content:flex-end}
}
