/**
 * Momendo (momendo.eu și momendo.ro) — lista modernă care înlocuiește vizual selecturile native (vezi mo-select.js).
 *
 * Același fișier stă în clients/momendo-eu/theme și clients/momendo-ro/theme; culorile vin din tokenii fiecărui sit
 * (--md-* pe momendo.ro, --mo-* pe momendo.eu), deci urmează singure tema închisă și cea deschisă.
 *
 * Ultima modificare: 2026-11-09 22:35
 * Modificari:
 *   2026-11-09 22:35 — Paleta finală: butoane #008577, accente violet, albastru, coral
 *   2026-11-09 22:08 — Creat: listă în tema sitului, cu căutare, pentru toate selecturile
 */

.mos, .mos-panel {
  --mos-surface: var(--md-surface, var(--mo-surface, #fff));
  --mos-surface-2: var(--md-surface-2, var(--mo-surface-2, #f1f3f5));
  --mos-bg: var(--md-bg, var(--mo-bg, #fff));
  --mos-text: var(--md-text, var(--mo-text, #1b1f26));
  --mos-muted: var(--md-muted, var(--mo-muted, #5b6470));
  --mos-line: var(--md-line, var(--mo-line, #d9dde3));
  --mos-line-2: var(--md-line-2, var(--mo-line-strong, #a9b0bb));
  --mos-accent: var(--md-accent, var(--mo-accent, #008577));
  --mos-soft: var(--md-accent-soft, var(--mo-accent-soft, rgba(0, 133, 119, .14)));
  --mos-ring: var(--md-accent-soft, var(--mo-accent-ring, rgba(0, 133, 119, .3)));
  --mos-shadow: var(--md-shadow, var(--mo-shadow, 0 6px 18px rgba(0, 0, 0, .18)));
  --mos-font: var(--md-font, var(--mo-font, system-ui, sans-serif));
}

/* Selectul adevărat rămâne în formular (trimite valoarea), dar nu se mai vede. */
select.mos-native {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important;
  overflow: hidden !important; clip-path: inset(50%) !important; pointer-events: none !important;
}

.mos { display: block; width: 100%; min-width: 0; }

.mos-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 12px 14px;
  border: 1px solid var(--mos-line-2); border-radius: 10px; background: var(--mos-surface); color: var(--mos-text);
  font: 400 16px/1.3 var(--mos-font); text-align: left; cursor: pointer; box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.mos-trigger:hover { border-color: var(--mos-muted); background: var(--mos-surface); color: var(--mos-text); }
.mos-trigger:focus { outline: none; }
.mos-trigger:focus-visible, .mos-trigger.is-open { border-color: var(--mos-accent); box-shadow: 0 0 0 3px var(--mos-ring); }
.mos-trigger:disabled { opacity: .55; cursor: not-allowed; }
.mos-value { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mos-chevron { flex: none; width: 12px; height: 8px; color: var(--mos-muted); transition: transform .16s ease; }
.mos-trigger.is-open .mos-chevron { transform: rotate(180deg); }

/* Locurile în care selectul avea alt aspect sau o iconiță în stânga. */
.md-field .md-ctl .mos-trigger { padding-left: 42px; }
.mo-field .mo-ctl .mos-trigger { padding-left: 2.75rem; }
.md-bigsearch .mos-trigger, .md-bigsearch .mos-trigger:hover {
  min-height: 44px; padding: 2px 0 2px 28px; border: 0; border-radius: 6px; background: transparent; line-height: 1.4;
}
.md-bigsearch .mos-trigger:focus-visible, .md-bigsearch .mos-trigger.is-open { border: 0; box-shadow: 0 0 0 2px var(--mos-accent); }

.mos-panel {
  position: fixed; z-index: 100000; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--mos-line-2); border-radius: 12px; background: var(--mos-surface); color: var(--mos-text);
  font: 400 15px/1.35 var(--mos-font); box-shadow: var(--mos-shadow);
}
@media (prefers-reduced-motion: reduce) { .mos-chevron, .mos-trigger { transition: none; } }

.mos-search { flex: none; padding: 8px; border-bottom: 1px solid var(--mos-line); }
.mos-search input {
  display: block; box-sizing: border-box; width: 100%; min-height: 42px; margin: 0; padding: 8px 12px;
  border: 1px solid var(--mos-line-2); border-radius: 8px; background: var(--mos-bg); color: var(--mos-text);
  font: 400 16px/1.3 var(--mos-font); box-shadow: none;
}
.mos-search input::placeholder { color: var(--mos-muted); opacity: 1; }
.mos-search input:focus { outline: none; border-color: var(--mos-accent); box-shadow: 0 0 0 3px var(--mos-ring); }

.mos-list { flex: 1 1 auto; min-height: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mos-list:focus { outline: none; }
.mos-list[hidden], .mos-empty[hidden], .mos-option[hidden], .mos-list [role="group"][hidden] { display: none; }
.mos-group-label { padding: 10px 10px 4px; color: var(--mos-muted); font-size: 12px; font-weight: 600; }
.mos-option {
  display: flex; align-items: center; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; overflow-wrap: anywhere;
}
.mos-option > span { flex: 1 1 auto; min-width: 0; }
.mos-option svg { flex: none; width: 16px; height: 16px; color: var(--mos-accent); visibility: hidden; }
.mos-option.is-active { background: var(--mos-surface-2); }
.mos-option[aria-selected="true"] { background: var(--mos-soft); font-weight: 600; }
.mos-option[aria-selected="true"].is-active { box-shadow: inset 0 0 0 1px var(--mos-accent); }
.mos-option[aria-selected="true"] svg { visibility: visible; }
.mos-option[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.mos-empty { padding: 14px 10px; color: var(--mos-muted); text-align: center; }
