/* Search categories only. The native select remains the submitted form field. */
.sse-search-controls[data-picker-theme], .sse-category-layer {
  --sse-picker-ready: 1;
  --sse-cat-surface: #fff;
  --sse-cat-text: #202634;
  --sse-cat-muted: #5e6572;
  --sse-cat-border: #aab2c0;
  --sse-cat-accent: #b5272d;
  --sse-cat-selected: #fff0f0;
  --sse-cat-hover: #f1f3f6;
  --sse-cat-shadow: 0 14px 38px rgba(18, 24, 38, .2);
}
[data-picker-theme="ranking_theme"] {
  --sse-cat-surface: #0c1425; --sse-cat-text: #e2e8f0; --sse-cat-muted: #a2b2c8;
  --sse-cat-border: #536782; --sse-cat-accent: #67e8f9; --sse-cat-selected: #123642; --sse-cat-hover: #19273d;
}
[data-picker-theme="purple_theme"] {
  --sse-cat-surface: #181020; --sse-cat-text: #f1eafa; --sse-cat-muted: #baabcc;
  --sse-cat-border: #79658d; --sse-cat-accent: #d5afff; --sse-cat-selected: #3a2455; --sse-cat-hover: #2b1e39;
}
[data-picker-theme="dazzling_theme"] {
  --sse-cat-surface: #18141e; --sse-cat-text: #f8edf5; --sse-cat-muted: #c5aebe;
  --sse-cat-border: #816979; --sse-cat-accent: #ffadda; --sse-cat-selected: #442138; --sse-cat-hover: #30212f;
}
[data-picker-theme="sale_themes"] {
  --sse-cat-accent: #b33c18; --sse-cat-selected: #fff1e9;
}
.sse-search-controls[data-picker-theme] .sse-category-field {
  display: flex; flex: 1 1 140px; min-width: 0; flex-direction: column; gap: 5px; color: inherit;
}
.sse-category-label { font-size: 13px; line-height: 1.5; }
.sse-search-controls .sse-category-field select[hidden] { display: none !important; }
.sse-search-controls[data-picker-theme] .sse-search-filters .sse-category-trigger {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  box-sizing: border-box; width: 100% !important; min-width: 0; min-height: 46px;
  margin: 0; padding: 10px 12px; border: 1px solid var(--sse-cat-border); border-radius: 8px;
  background: var(--sse-cat-surface); color: var(--sse-cat-text); font: inherit; font-size: 15px;
  line-height: 1.5; text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sse-category-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sse-category-trigger svg, .sse-category-panel svg {
  display: block; flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sse-search-controls .sse-category-trigger[aria-expanded="true"] { border-color: var(--sse-cat-accent); }
.sse-search-controls .sse-category-trigger:disabled { opacity: .6; cursor: not-allowed; }
.sse-category-layer {
  position: fixed; inset: 0; z-index: 2147483000; background: transparent; color: var(--sse-cat-text);
  font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.sse-category-layer[hidden] { display: none !important; }
.sse-category-panel {
  position: absolute; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box;
  margin: 0; padding: 0; border-radius: 12px; background: var(--sse-cat-surface); box-shadow: var(--sse-cat-shadow);
  text-align: start; color: var(--sse-cat-text); color-scheme: light;
}
[data-picker-theme="ranking_theme"] .sse-category-panel,
[data-picker-theme="purple_theme"] .sse-category-panel,
[data-picker-theme="dazzling_theme"] .sse-category-panel { color-scheme: dark; }
.sse-category-head { display: flex; flex: 0 0 auto; align-items: center; gap: 16px; padding: 10px 12px 8px 18px; border-bottom: 1px solid var(--sse-cat-border); }
.sse-category-panel .sse-category-title { flex: 1; min-width: 0; margin: 0; padding: 0; color: var(--sse-cat-text); font-family: inherit; font-size: 16px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.sse-category-panel .sse-category-close {
  position: static; display: flex; flex: 0 0 44px; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 8px; transform: none;
  color: var(--sse-cat-muted); background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sse-category-list {
  position: relative; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 6px; scrollbar-width: thin; scrollbar-color: var(--sse-cat-border) var(--sse-cat-surface);
  -webkit-overflow-scrolling: touch;
}
.sse-category-list::-webkit-scrollbar { width: 6px; }
.sse-category-list::-webkit-scrollbar-thumb { background: var(--sse-cat-border); border-radius: 3px; }
.sse-category-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; box-sizing: border-box;
  min-height: 46px; margin: 2px 0; padding: 10px 12px; border-radius: 7px; color: var(--sse-cat-text);
  font-size: 15px; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sse-category-option-text { min-width: 0; overflow-wrap: anywhere; }
.sse-category-option svg { visibility: hidden; }
.sse-category-option[aria-selected="true"] { background: var(--sse-cat-selected); color: var(--sse-cat-accent); font-weight: 600; }
.sse-category-option[aria-selected="true"] svg { visibility: visible; }
.sse-category-list:focus { outline: none; }
.sse-category-list:focus .sse-category-active { outline: 2px solid var(--sse-cat-accent); outline-offset: -2px; }
.sse-search-controls .sse-category-trigger:focus-visible, .sse-category-close:focus-visible { outline: 2px solid var(--sse-cat-accent); outline-offset: 3px; }
.sse-category-panel ::selection { color: var(--sse-cat-text); background: var(--sse-cat-selected); }
@media (hover: hover) {
  .sse-category-option:hover, .sse-category-close:hover { background: var(--sse-cat-hover); }
}
@media (max-width: 767px) {
  .sse-search-controls .sse-search-filters .sse-category-field { grid-column: 1 / -1; }
  .sse-search-controls[data-picker-theme] .sse-search-filters .sse-category-trigger { min-height: 48px; font-size: 16px; }
  .sse-category-layer { background: rgba(4, 8, 18, .56); }
  .sse-category-panel {
    left: 0; right: 0; bottom: 0; width: 100%; max-width: 560px; max-height: 72vh; margin: 0 auto;
    border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sse-category-head { padding: 12px 12px 10px 20px; }
  .sse-category-list { padding: 6px 10px 12px; }
  .sse-category-option { min-height: 48px; padding: 12px 10px; font-size: 16px; }
}
