/* Global searchable select (gssel)
   Only functional chrome — size/look are cloned from each native <select>
   via inline styles in searchableSelect.js so originals stay unchanged. */

   select.gssel-native {
    display: none !important;
  }
  
  .gssel-input {
    /* Do NOT set width/height/padding/font — applied from the original select */
    margin: 0;
    cursor: pointer;
    caret-color: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }

  /*
   * Fluid form controls — beat stale inline px widths baked during SPA navigations
   * (e.g. retail dashboard → alerts / event-monitoring) before layout settles.
   * Classes are copied from the native <select> onto .gssel-input.
   */
  .gssel-input.form-select,
  .gssel-input.form-control,
  .gssel-input.filter-select,
  .gssel-input.filter-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .gssel-input.typing {
    caret-color: currentColor;
    cursor: text;
  }
  
  .gssel-input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
  }
  
  .gssel-options {
    display: none;
    box-sizing: border-box;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
    /* font-size / family / weight set from the dropdown via JS */
    font-weight: 400;
  }
  
  .gssel-options.gssel-open {
    display: block;
    z-index: 100040;
  }
  
  .gssel-options::-webkit-scrollbar {
    width: 4px;
  }
  .gssel-options::-webkit-scrollbar-track {
    background: transparent;
  }
  .gssel-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
  }
  
  .gssel-opt {
    padding: 6px 10px;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    cursor: pointer;
    transition: background 0.1s;
  }
  
  .gssel-opt:hover {
    background: #f1f5f9;
  }
  
  .gssel-opt.selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: inherit; /* same weight as dropdown — not bold */
  }
  
  .gssel-empty {
    padding: 6px 10px;
    font-size: inherit;
    font-weight: inherit;
    color: #94a3b8;
    cursor: default;
  }
  
  /* Dark mode — options panel only */
  body.dark-mode .gssel-options,
  html.dark .gssel-options,
  .dark .gssel-options {
    background: #1a1f2e;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
  
  body.dark-mode .gssel-opt,
  html.dark .gssel-opt,
  .dark .gssel-opt {
    color: #cbd5e1;
  }
  
  body.dark-mode .gssel-opt:hover,
  html.dark .gssel-opt:hover,
  .dark .gssel-opt:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
  }
  
  body.dark-mode .gssel-opt.selected,
  html.dark .gssel-opt.selected,
  .dark .gssel-opt.selected {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
  }
  
  body.dark-mode .gssel-empty,
  html.dark .gssel-empty,
  .dark .gssel-empty {
    color: #64748b;
  }
  
  body.dark-mode .gssel-options::-webkit-scrollbar-thumb,
  html.dark .gssel-options::-webkit-scrollbar-thumb,
  .dark .gssel-options::-webkit-scrollbar-thumb {
    background: #475569;
  }
  