/* =====================================================================
   WM custom select — progressive enhancement for every native <select>.
   The real <select> stays in the DOM (focusable, validated, submitted);
   this only replaces its appearance. See assets/js/wm-select.js.
   ===================================================================== */

.wm-sel { position: relative; display: block; width: 100%; }

/* The native control stays reachable for validation + assistive tech, but
   sits behind the trigger. Not display:none, so :invalid still works. */
.wm-sel > select.wm-sel-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

/* ---------- trigger ---------- */
.wm-sel-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 40px 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: #0b0b0b;
  color: #fff;
  font: inherit;
  font-size: 14px;
  text-align: start;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.wm-sel-btn:hover { border-color: rgba(255, 255, 255, 0.24); }
.wm-sel-btn:focus-visible,
.wm-sel.is-open > .wm-sel-btn {
  outline: none;
  border-color: rgba(242, 200, 107, 0.75);
  box-shadow: 0 0 0 3px rgba(242, 200, 107, 0.13);
}
.wm-sel-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-sel-btn.is-placeholder .wm-sel-label { color: rgba(255, 255, 255, 0.38); }

.wm-sel-caret {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), color .18s ease;
}
.wm-sel.is-open .wm-sel-caret { transform: rotate(180deg); color: #f2c86b; }
.wm-sel-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- popup (position: fixed, so no container can clip it) ---------- */
.wm-sel-pop {
  position: fixed;
  z-index: 100000;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(242, 200, 107, 0.3);
  background: #14110c;                       /* fully opaque, never see-through */
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.6);
  animation: wmSelIn .16s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes wmSelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.wm-sel-pop.is-up { transform-origin: bottom center; }

.wm-sel-search {
  flex: 0 0 auto;
  width: 100%;
  margin-bottom: 5px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0a;
  color: #fff;
  font: inherit;
  font-size: 13px;
}
.wm-sel-search:focus { outline: none; border-color: rgba(242, 200, 107, 0.6); }

.wm-sel-list {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wm-sel-opt {
  padding: 10px 12px;
  border-radius: 9px;
  color: rgba(230, 240, 250, 0.84);
  font-size: 13.5px;
  line-height: 1.35;
  cursor: pointer;
  transition: background .13s ease, color .13s ease;
}
.wm-sel-opt:hover,
.wm-sel-opt.is-active { background: rgba(242, 200, 107, 0.13); color: #fff; }
.wm-sel-opt.is-chosen { color: #f3d27d; font-weight: 600; }
.wm-sel-opt.is-chosen::after { content: "✓"; float: inline-end; margin-inline-start: 8px; }
.wm-sel-opt.is-hidden { display: none; }
.wm-sel-opt.is-disabled { opacity: .4; cursor: not-allowed; }
.wm-sel-opt.is-placeholder { color: rgba(255, 255, 255, 0.42); font-style: italic; }
.wm-sel-empty { padding: 11px 12px; color: rgba(255, 255, 255, 0.4); font-size: 12.5px; font-style: italic; }

.wm-sel-list::-webkit-scrollbar { width: 8px; }
.wm-sel-list::-webkit-scrollbar-track { background: transparent; }
.wm-sel-list::-webkit-scrollbar-thumb { background: rgba(242, 200, 107, 0.3); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  .wm-sel-pop { animation: none; }
  .wm-sel-caret { transition: none; }
}
