/* Themed custom select — shared (explore + dashboard) */

.tls-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.tls-custom-select {
  position: relative;
  display: inline-block;
  min-width: 9.5rem;
  vertical-align: middle;
}

.db-select-wrap .tls-custom-select {
  display: block;
  width: 100%;
  min-width: 0;
}

.db-select-wrap.db-select-inline .tls-custom-select {
  min-width: 140px;
}

.tls-custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-width: 9.5rem;
  padding: 0.42rem 2rem 0.42rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6560' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.db-select-wrap .tls-custom-select__trigger {
  min-width: 0;
  font-size: 0.88rem;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
}

.tls-custom-select__trigger:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--border));
}

.tls-custom-select__trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 57, 10, 0.15);
}

.tls-custom-select.is-open .tls-custom-select__trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 57, 10, 0.12);
}

.tls-custom-select__menu {
  position: fixed;
  z-index: 6500;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  max-height: min(280px, 50vh);
  overflow-y: auto;
}

.tls-custom-select__option {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.db-select-wrap .tls-custom-select__option {
  font-size: 0.88rem;
}

.tls-custom-select__option:hover,
.tls-custom-select__option:focus {
  background: var(--cream);
}

.tls-custom-select__option[aria-selected="true"] {
  background: rgba(200, 57, 10, 0.1);
  color: var(--accent);
  font-weight: 600;
}

[data-theme="dark"] .tls-custom-select__menu {
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .tls-custom-select__option[aria-selected="true"] {
  background: rgba(224, 72, 18, 0.15);
}
