/* BIMFLOW — Select custom tip Apple (cross-platform) */
.bf-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.bf-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;
}

/* !important: multe pagini au `button { background:#fff }` / `:hover #f6f7f8`
   care altfel vopsesc trigger-ul și opțiunile (sunt <button>). */
.bf-select-trigger {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  background-color: rgba(0, 0, 0, 0.35) !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.bf-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  -webkit-text-fill-color: inherit;
}

.bf-select-trigger:hover,
.bf-select-trigger:focus,
.bf-select-trigger:active {
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: rgba(0, 0, 0, 0.45) !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc;
}

.bf-select-trigger:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.bf-select-trigger[aria-expanded="true"],
.bf-select.is-open .bf-select-trigger {
  border-color: rgba(249, 115, 22, 0.65) !important;
  background: rgba(0, 0, 0, 0.45) !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18) !important;
  color: #f8fafc !important;
}

.bf-select.is-disabled .bf-select-trigger {
  opacity: 0.55;
  cursor: not-allowed;
}

.bf-select-chevron {
  font-size: var(--text-micro);
  opacity: 0.75;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.bf-select-trigger[aria-expanded="true"] .bf-select-chevron {
  transform: rotate(180deg);
}

.bf-select-menu {
  position: absolute;
  z-index: 10050;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141418;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  display: none;
  -webkit-overflow-scrolling: touch;
}

.bf-select-menu.is-open {
  display: block;
}

.bf-select-menu.bf-select-menu--portal {
  position: fixed;
  left: 0;
  right: auto;
  top: auto;
  margin: 0;
}

.bf-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px !important;
  border: none !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.12s ease, color 0.12s ease;
}

.bf-select-option-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.bf-select-check {
  width: 1em;
  flex-shrink: 0;
  font-size: var(--text-sm);
  line-height: 1;
  opacity: 0;
  text-align: center;
}

.bf-select-option.is-selected .bf-select-check {
  opacity: 1;
}

/* Apple-like: selecția e marcată cu ✓; portocaliu doar pe hover/focus */
.bf-select-option.is-selected {
  background: transparent !important;
  background-color: transparent !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.bf-select-option:hover,
.bf-select-option:focus,
.bf-select-option:focus-visible,
.bf-select-option:active {
  background: #f97316 !important;
  background-color: #f97316 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  outline: none;
}

.bf-select-option:hover .bf-select-check,
.bf-select-option:focus-visible .bf-select-check {
  opacity: 1;
}

/* Integrare .select-right (chevron vechi ascuns) */
.select-right.bf-select-host,
.select-right:has(.bf-select) {
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
  height: auto !important;
  box-shadow: none !important;
}

.select-right.bf-select-host .sel-btn,
.select-right:has(.bf-select) .sel-btn {
  display: none !important;
}

.tw-conv-field .bf-select,
.tw-conv-cat-wrap.bf-select {
  margin-bottom: 0;
}

.tw-conv-cat-wrap {
  margin-bottom: 12px;
}

.conv-field .bf-select {
  margin-top: 6px;
}

body.light-mode .bf-select-trigger {
  background: #fff !important;
  background-color: #fff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}

body.light-mode .bf-select-trigger:hover,
body.light-mode .bf-select-trigger:focus,
body.light-mode .bf-select-trigger:active,
body.light-mode .bf-select-trigger[aria-expanded="true"],
body.light-mode .bf-select.is-open .bf-select-trigger {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  border-color: #94a3b8 !important;
}

body.light-mode .bf-select-menu {
  background: #1a1a1e !important;
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .bf-select-option {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc;
  background: transparent !important;
}

body.light-mode .bf-select-option:hover,
body.light-mode .bf-select-option:focus,
body.light-mode .bf-select-option:focus-visible,
body.light-mode .bf-select-option:active {
  background: #f97316 !important;
  background-color: #f97316 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
