/* ============================================================
   Cerivio · modern dropdown foundation
   Referenced from all 4 SPAs since 2026-07-24 · was missing on disk
   until 2026-08-13 · every <select class="ce-select"> now renders
   uniformly across buyer / seller / admin / aegis.
   ============================================================ */

.ce-select {
  /* reset native chrome + wire custom chevron */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;

  /* uniform shape + typography */
  padding: 7px 32px 7px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text, #0F172A);
  background-color: var(--surface, #FFFFFF);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 7px;
  min-width: 130px;
  height: 34px;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s, background-color .12s;
  box-sizing: border-box;
  vertical-align: middle;
}

.ce-select:hover {
  border-color: #CBD5E1;
  background-color: #FAFBFC;
}

.ce-select:focus,
.ce-select:focus-visible {
  outline: none;
  border-color: var(--mint, #2DD4A0);
  box-shadow: 0 0 0 3px rgba(45, 212, 160, 0.18);
  background-color: var(--surface, #FFFFFF);
}

.ce-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #F3F4F6;
}

.ce-select option {
  color: var(--text, #0F172A);
  background: var(--surface, #FFFFFF);
  padding: 6px 10px;
  font-weight: 500;
}

/* Size variants */
.ce-select.ce-select-sm {
  padding: 5px 28px 5px 10px;
  font-size: 11.5px;
  height: 30px;
  min-width: 110px;
  background-size: 9px 5px;
  background-position: right 8px center;
}
.ce-select.ce-select-lg {
  padding: 10px 36px 10px 14px;
  font-size: 13.5px;
  height: 40px;
  min-width: 160px;
}

/* Full-width variant used inside forms */
.ce-select.ce-select-block,
.form-row .ce-select {
  width: 100%;
  min-width: 0;
  display: block;
}

/* Dark/stealth mode variants (both SPAs set body.theme-dark) */
body.theme-dark .ce-select {
  color: #E2E8F0;
  background-color: #0F172A;
  border-color: rgba(148, 163, 184, 0.25);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%2394A3B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
body.theme-dark .ce-select:hover {
  border-color: rgba(148, 163, 184, 0.45);
  background-color: #131E31;
}
body.theme-dark .ce-select:focus,
body.theme-dark .ce-select:focus-visible {
  border-color: var(--mint, #2DD4A0);
  box-shadow: 0 0 0 3px rgba(45, 212, 160, 0.22);
  background-color: #0F172A;
}
body.theme-dark .ce-select option {
  color: #E2E8F0;
  background: #0F172A;
}

/* When placed inside .filter-bar the parent already gives layout · we just
   inherit and ensure the height matches sibling <input type="search"> */
.filter-bar .ce-select {
  height: 34px;
}

/* Reduce-motion respectful */
@media (prefers-reduced-motion: reduce) {
  .ce-select { transition: none; }
}

/* ============================================================
   v0.18-35 · DARK THEME · 2026-08-21
   Bug: SPA-local dark rules like
     body.theme-dark input, body.theme-dark select { background: var(--surface-2); … }
   use the `background` SHORTHAND, which resets background-repeat
   to `repeat` — the chevron SVG then tiles across the whole
   control (zigzag pattern) and drowns the label text.
   Fix: re-assert the full chevron spec + dark colours at higher
   specificity (0,2,2) so no SPA-local shorthand can break it.
   ============================================================ */
body.theme-dark select.ce-select {
  background-color: var(--surface-2, #1E293B);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%2394A3B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  color: var(--text, #E2E8F0);
  border-color: rgba(255, 255, 255, 0.14);
}
body.theme-dark select.ce-select:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background-color: var(--surface-2, #1E293B);
}
body.theme-dark select.ce-select:focus,
body.theme-dark select.ce-select:focus-visible {
  border-color: var(--mint, #2DD4A0);
  background-color: var(--surface-2, #1E293B);
}
body.theme-dark select.ce-select option {
  color: var(--text, #E2E8F0);
  background: var(--surface-2, #1E293B);
}
