/* Neat UI — select.css: searchable dropdown component */

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

.neat-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.neat-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-lg, 2px);
  background: rgba(248, 249, 251, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 14px;
  color: var(--text-main, #2d3142);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: var(--transition, all 0.3s ease);
  box-shadow: var(--shadow-soft, 0 10px 40px rgba(42, 79, 246, 0.06)), inset 0 0 0 1px #eef2f7;
}

.neat-select-trigger:hover {
  background: rgba(255, 255, 255, 0.96);
}

.neat-select.is-open .neat-select-trigger,
.neat-select-trigger:focus-visible {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-soft, rgba(42, 79, 246, 0.1)), inset 0 0 0 1px var(--blue-main, #254ef6);
}

.neat-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neat-select-label.is-placeholder {
  color: #94a3b8;
}

.neat-select-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.neat-select.is-open .neat-select-chevron {
  transform: rotate(180deg);
  color: var(--blue-main, #254ef6);
}

.neat-select-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  max-height: 280px;
  border-radius: var(--radius-lg, 2px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft, 0 10px 40px rgba(42, 79, 246, 0.06)), 0 16px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.neat-select.is-open .neat-select-panel {
  display: flex;
}

.neat-select-search-wrap {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.neat-search-input {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 2px;
  background: #f8fafc;
  font-size: 14px;
  color: var(--text-main, #2d3142);
  outline: none;
  font-family: inherit;
  box-shadow: inset 0 0 0 1px #e8edf3;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.neat-search-input:focus {
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-soft, rgba(42, 79, 246, 0.1)), inset 0 0 0 1px var(--blue-main, #254ef6);
}

.neat-select-options {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}

.neat-select-option {
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 14px;
  color: #475467;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.4;
}

.neat-select-option:hover,
.neat-select-option.is-highlighted {
  background: rgba(42, 79, 246, 0.06);
  color: var(--blue-main, #254ef6);
}

.neat-select-option.is-selected {
  background: var(--blue-soft, rgba(42, 79, 246, 0.1));
  color: var(--blue-main, #254ef6);
  font-weight: 600;
}

.neat-select-option.is-hidden {
  display: none;
}

.neat-select-option--clear {
  color: #94a3b8;
  font-style: italic;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
  border-radius: 2px 2px 0 0;
}

.neat-select-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  list-style: none;
}

.neat-select-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
  list-style: none;
}

.neat-select-load-more.is-hidden {
  display: none;
}

.neat-select-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--blue-main, #254ef6);
  border-radius: 50%;
  animation: neat-select-spin 0.75s linear infinite;
}

@keyframes neat-select-spin {
  to { transform: rotate(360deg); }
}

/* Multi-select panel (checkbox options inside dropdown) */
.neat-select-option--checklabel {
  padding: 0;
  cursor: default;
}

.neat-select-option--checklabel label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #475467;
  line-height: 1.4;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.neat-select-option--checklabel label:hover {
  background: rgba(42, 79, 246, 0.06);
  color: var(--blue-main, #254ef6);
}

.neat-select-option--checklabel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--blue-main, #254ef6);
  cursor: pointer;
}

.neat-select-option--checklabel.is-selected label {
  background: var(--blue-soft, rgba(42, 79, 246, 0.1));
  color: var(--blue-main, #254ef6);
  font-weight: 600;
}

.neat-select-option--checklabel.is-muted label {
  color: #94a3b8;
}

.neat-select-option--checklabel.is-muted label:hover {
  color: var(--blue-main, #254ef6);
}

.neat-select-search-wrap.has-icon {
  position: relative;
}

.neat-select-search-wrap.has-icon .neat-search-input {
  padding-left: 36px;
}

.neat-select-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

/* Combobox: type directly in the field */
.neat-select--combobox .neat-select-trigger {
  cursor: text;
  padding: 0 10px 0 14px;
}

.neat-select-combobox-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: inherit;
  outline: none;
  padding: 0;
}

.neat-select-combobox-input::placeholder {
  color: #94a3b8;
}

.neat-select-option-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.neat-select-option-icon {
  font-size: 18px !important;
  width: 20px;
  height: 20px;
  line-height: 20px;
  color: #94a3b8;
  flex-shrink: 0;
  margin-top: 1px;
}

.neat-select-option-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.neat-select-option-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.neat-select-option-meta {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 400;
  line-height: 1.3;
}

.neat-select-option.is-selected .neat-select-option-icon,
.neat-select-option.is-highlighted .neat-select-option-icon,
.neat-select-option:hover .neat-select-option-icon {
  color: inherit;
}

.neat-select-mark {
  background: rgba(136, 193, 56, 0.28);
  color: inherit;
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}

.neat-select-option--divider.is-hidden {
  display: none;
}

.neat-select-option--divider {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  cursor: default;
}

.neat-select-panel__hint {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}
