/* ═══════════════════════════════════════
   Searchable Select Component
   ═══════════════════════════════════════ */

.ss-wrap {
  position: relative;
  display: block;
  width: 100%;
}

/* ── Trigger button ──────────────────── */
.ss-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  min-height: 40px;
  transition: border-color .18s, box-shadow .18s;
  text-align: left;
}

.ss-btn:hover { border-color: #185FA5; }
.ss-btn:focus { outline: none; border-color: #185FA5; box-shadow: 0 0 0 3px rgba(24,95,165,.1); }
.ss-btn--open  { border-color: #185FA5; box-shadow: 0 0 0 3px rgba(24,95,165,.1); }

.ss-btn__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-btn__label--val { color: #042C53; }

.ss-chevron {
  flex-shrink: 0;
  color: #6b7280;
  transition: transform .18s;
}

.ss-btn--open .ss-chevron { transform: rotate(180deg); }

/* ── Dropdown (portalled to body) ─────── */
.ss-drop {
  display: none;
  background: #fff;
  border: 1.5px solid #185FA5;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(4,44,83,.15);
  overflow: hidden;
}

.ss-drop--open { display: block; }

/* ── Search input ──────────────────────── */
.ss-search {
  display: block;
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: none;
  border-bottom: 1px solid #e4e7ec;
  font-family: inherit;
  font-size: 13px;
  color: #042C53;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath stroke-linecap='round' d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
  outline: none;
  box-sizing: border-box;
}

.ss-search::placeholder { color: #94a3b8; }
.ss-search:focus { background-color: #fff; }

/* ── Options list ──────────────────────── */
.ss-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.ss-list::-webkit-scrollbar { width: 5px; }
.ss-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.ss-option {
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
  transition: background .1s;
}

.ss-option:hover { background: #f0f7ff; color: #185FA5; }

.ss-option--sel {
  background: #ebf4fd;
  color: #185FA5;
  font-weight: 600;
}

.ss-option mark {
  background: #fef9c3;
  color: #92400e;
  padding: 0;
  border-radius: 2px;
  font-style: normal;
}

.ss-empty {
  padding: 10px 14px;
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
}

/* ═══════════════════════════════════════
   Tag Input Component (type + Enter)
   ═══════════════════════════════════════ */

.tag-input-wrap {
  position: relative;
  width: 100%;
}

.tag-input-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: text;
  box-sizing: border-box;
  transition: border-color .18s, box-shadow .18s;
}

.tag-input-box:focus-within {
  border-color: #185FA5;
  box-shadow: 0 0 0 3px rgba(24,95,165,.1);
}

.tag-input-tags {
  display: contents;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  background: #ebf4fd;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #185FA5;
  white-space: nowrap;
  line-height: 1.4;
}

.tag-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(24,95,165,.15);
  color: #185FA5;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background .15s;
}

.tag-chip__remove:hover {
  background: #185FA5;
  color: #fff;
}

.tag-input-text {
  flex: 1;
  min-width: 140px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: #042C53;
  background: transparent;
  padding: 2px 0;
}

.tag-input-text::placeholder { color: #94a3b8; }

.tag-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #185FA5;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(4,44,83,.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.tag-suggestions::-webkit-scrollbar { width: 5px; }
.tag-suggestions::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.tag-suggestions.ts-open { display: block; }

.tag-suggestions li {
  padding: 8px 14px;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
  transition: background .1s;
}

.tag-suggestions li:hover,
.tag-suggestions li.ts-active {
  background: #f0f7ff;
  color: #185FA5;
}

/* ── Offres sidebar overrides ─────────── */
.ol-fgroup .ss-btn {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7280;
  min-height: 38px;
}

.ol-fgroup .ss-btn:hover,
.ol-fgroup .ss-btn:focus,
.ol-fgroup .ss-btn--open { border-color: #185FA5; }

.ol-fgroup .ss-btn__label--val { color: #1a1a1a; }
