/* ── Shared Searchable Select Component CSS ─────────────────── */

.custom-select-wrap {
  position: relative;
  width: 100%;
}

.custom-select-wrap.is-phone-select {
  min-width: 170px;
}

/* Flag Emoji font fallback for Windows Chromium browsers */
select,
.custom-select-option,
.custom-select-trigger,
.custom-select-label {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;
}

.custom-select-trigger {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink, #1c2b36);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  box-sizing: border-box;
}

.custom-select-trigger:hover:not(:disabled) {
  border-color: var(--teal, #008080);
}

.custom-select-trigger:focus-visible {
  outline: none;
  border-color: var(--teal, #008080);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.15);
}

.custom-select-wrap.is-open .custom-select-trigger {
  border-color: var(--teal, #008080);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.15);
}

.custom-select-wrap.is-disabled .custom-select-trigger,
.custom-select-trigger:disabled {
  background: #f6f8fa;
  border-color: #e1e4e8;
  color: #8c9fa4;
  cursor: not-allowed;
}

.custom-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

.custom-select-label.is-placeholder {
  color: #8c9fa4;
  font-weight: 400;
}

.custom-select-arrow {
  flex-shrink: 0;
  color: #6e7781;
  transition: transform 0.2s ease;
}

.custom-select-wrap.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

/* Floating Dropdown Panel */
.custom-select-dropdown {
  display: none;
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.12),
    0 8px 10px -6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  box-sizing: border-box;
}

.custom-select-dropdown.is-floating {
  display: flex !important;
  flex-direction: column;
}

.custom-select-search {
  padding: 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.custom-select-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.5px;
  box-sizing: border-box;
}

.custom-select-search-input:focus {
  outline: none;
  border-color: var(--teal, #008080);
}

.custom-select-options {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  margin: 0;
  list-style: none;
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  margin: 0;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink, #1c2b36);
  cursor: pointer;
  transition: background-color 0.12s;
}

.custom-select-option:hover,
.custom-select-option.is-highlighted {
  background: var(--teal-soft, #e8f8f7);
  color: var(--deep, #0c4a4a);
}

.custom-select-option.is-selected {
  background: #dff3f4;
  color: var(--deep, #0c4a4a);
  font-weight: 600;
}

.option-check {
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--teal, #008080);
  flex-shrink: 0;
}

.option-check.is-visible {
  display: inline-flex;
}

.option-item-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* Multi-select chips */
.custom-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.custom-select-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-soft, #e8f8f7);
  color: var(--deep, #0c4a4a);
  border: 1px solid rgba(0, 128, 128, 0.2);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
}

.custom-select-chip .chip-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  color: var(--teal, #008080);
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.custom-select-chip .chip-remove:hover {
  color: #c53030;
}

.native-hidden {
  display: none !important;
}
