/* =========================[ FEX SELECT - BASE ]========================= */
.fex-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  font-size: var(--font-size-small);
  font-family: var(--font-primary);
  width: 100%;
}

.fex-select-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-tiny);       /* cantos mais suaves */
  background: var(--white);
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 38px;                        /* um pouco maior para “card” */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.fex-select-wrapper:hover {
  border-color: var(--color-border-default-focus);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.fex-select-content {
  padding: 6px 12px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  color: var(--color-text);
  font-weight: 500;
}

.fex-select-icon {
  width: 36px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--color-border-default);
  background: var(--white);
  color: var(--color-gray);
}

.fex-select-icon i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.fex-select.open .fex-select-icon i {
  transform: rotate(180deg);
}

/* =========================[ DROPDOWN OPTIONS ]========================= */
.fex-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: all 0.2s ease;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  border-radius: var(--radius-tiny);
  background: var(--white);
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1); /* sombra de card suspenso */
  z-index: 2000;
}

.fex-select.open .fex-select-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fex-select-option {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  background-color: #ffffff;
  color: var(--color-dark);
  font-weight: 400;
}

.fex-select-option:hover {
  background-color: var(--color-border-default);
  color: var(--color-dark);
}

/* =========================[ ESTADOS ]========================= */
.fex-select.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* =========================[ COMPACT MODE (Flatpickr) ]========================= */
.fex-select-compact .fex-select-wrapper,
.fex-select--compact .fex-select-wrapper {
  height: 28px;
  padding: 0;
  min-height: unset;
  box-shadow: none; /* compactos não precisam parecer cards */
}

.fex-select-compact .fex-select-content,
.fex-select--compact .fex-select-content {
  padding: 2px 8px;
  font-weight: 600;
  font-size: var(--font-size-small);
}

/* =========================[ SELEÇÃO DE TEXTO NO INPUT ]========================= */
.fex-select-content::selection {
  background: transparent;
  color: var(--color-text);
}

.fex-select-content::-moz-selection {
  background: transparent;
  color: var(--color-text);
}

/* =========================[ CARD STATE QUANDO ABERTO ]========================= */
.fex-select.open .fex-select-wrapper {
  border-color: var(--color-border-default-focus);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  z-index: 2100;
  position: relative;
}

/* =========================[ REMOVER BORDA NATIVA DO FOCUS ]========================= */
.fex-select-content:focus,
.fex-select-wrapper:focus,
.fex-select-option:focus {
  outline: none;
  box-shadow: none;
}


.fex-select-wrapper:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26,128,228,0.25); /* azul clarinho suave */
  border-radius: var(--radius-tiny);
}

.fex-select-option.highlighted {
  background-color: var(--color-border-default);
  color: var(--color-dark);
}
