/* Seletores do Filtro em lista do app (filter-pickers-v1.js). */
select.fpk-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;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.fpk {
  position: relative;
}

.fpk svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Campo fechado: igual aos outros campos (46px, cantos 12px). */
.fpk-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--fx-line-2);
  background: var(--fx-bg-2);
  color: var(--fx-text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.fpk-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fpk-trigger svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--fx-faint);
  transition: transform 0.18s ease;
}

.fpk-trigger:hover:not(:disabled) {
  border-color: var(--fx-line-3);
}

.fpk.open .fpk-trigger,
.fpk-trigger:focus-visible {
  outline: none;
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 3px var(--fx-focus);
}

.fpk.open .fpk-trigger svg {
  transform: rotate(180deg);
}

.fpk-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Lista aberta: cartão flutuante com linhas e marcador redondo. */
.fpk-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--fx-line-2);
  background: var(--fx-surface);
  box-shadow: var(--fx-pop);
  overscroll-behavior: contain;
}

.fpk.open .fpk-menu {
  display: grid;
  gap: 2px;
}

.fpk-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fx-text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.fpk-opt > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fpk-opt:hover,
.fpk-opt:focus-visible {
  outline: none;
  background: var(--fx-surface-3);
}

.fpk-opt.on {
  background: var(--fx-accent-soft);
  font-weight: 600;
}

.fpk-opt > i {
  flex: none;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1.6px solid var(--fx-line-3);
  background: transparent center / 11px 11px no-repeat;
}

.fpk-opt.on > i {
  border-color: var(--fx-accent);
  background-color: var(--fx-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.fpk-opt:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .fpk-trigger svg { transition: none; }
}

/* ── Blocos recentes: Estação + Mín/h lado a lado; valor/h em cada bloco ── */
.apex-rb-field.rbx-on {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 124px !important;
  grid-template-rows: auto auto !important;
  column-gap: 10px !important;
  row-gap: 6px !important;
}

.apex-rb-field.rbx-on > label { grid-column: 1; grid-row: 1; }
.apex-rb-field.rbx-on > .fpk { grid-column: 1; grid-row: 2; min-width: 0; }
.apex-rb-field.rbx-on > .rbx-label { grid-column: 2; grid-row: 1; }
.apex-rb-field.rbx-on > .rbx-minh { grid-column: 2; grid-row: 2; }

.rbx-label {
  color: var(--fx-text);
  font-size: 13px;
  font-weight: 600;
}

.rbx-minh {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--fx-line-2);
  background: var(--fx-bg-2);
  cursor: text;
}

.rbx-minh:focus-within {
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 3px var(--fx-focus);
}

.rbx-cur {
  color: var(--fx-faint);
  font-size: 14px;
  font-weight: 500;
}

.shell .rbx-minh input:not([type=checkbox]):not([type=radio]),
.apex-rb-pop .apex-rb-field .rbx-minh input[type=number]:not([type=checkbox]):not([type=radio]):not([type=range]),
.rbx-minh input {
  border-radius: 0 !important;
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: var(--fx-text) !important;
  font: inherit;
  font-size: 16px !important;
  font-weight: 500 !important;
}

.rbx-minh input::placeholder {
  color: var(--fx-faint) !important;
}

.apex-rb-card[data-rb-hide] {
  display: none !important;
}

/* Linha: horário | valor; dia · estação | valor/h; quando apareceu. */
.apex-rb-card[data-rate]:not([data-rate=""])::after {
  content: attr(data-rate);
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  color: var(--fx-faint);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.apex-rb-card[data-rate]:not([data-rate=""]) > div > .apex-rb-seen {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  justify-self: start !important;
}

.apex-rb-list.rbx-all-hidden {
  display: none !important;
}

.rbx-empty {
  margin: 4px 0 0;
  padding: 20px 16px;
  border-radius: 16px;
  border: 1px dashed var(--fx-line-2);
  color: var(--fx-muted);
  font-size: 13.5px;
  text-align: center;
}
