/* Ofertas redesenhada (offers-client-v1.js) e barra de filtros original no visual v2. */

.panel.ofx-on > .offer-section {
  display: none !important;
}

.ofx-root {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.ofx-root svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ofx-root button {
  font: inherit;
  cursor: pointer;
}

.ofx-root button:focus-visible {
  outline: 2px solid var(--fx-accent);
  outline-offset: 2px;
}

/* ── Dia ── */
.ofx-day-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
}

.ofx-day-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--fx-text);
}

.ofx-day-head span {
  font-size: 12px;
  color: var(--fx-faint);
}

.ofx-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ── Linha da oferta ── */
.ofx-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 150px auto;
  align-items: center;
  gap: 20px;
  padding: 16px 18px 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.ofx-row:hover {
  border-color: var(--fx-line-3);
  background: var(--fx-surface-2);
}

html[data-af-theme=light] .ofx-row {
  box-shadow: var(--fx-lift);
}

.ofx-time {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 18px;
  border-right: 1px solid var(--fx-line);
}

.ofx-time strong {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--fx-text);
  white-space: nowrap;
}

.ofx-time span {
  font-size: 12px;
  color: var(--fx-muted);
  white-space: nowrap;
}

.ofx-time em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--fx-faint);
  white-space: nowrap;
}

.ofx-time em svg {
  width: 13px;
  height: 13px;
}

.ofx-place {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ofx-area {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ofx-area svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--fx-accent);
}

.ofx-area strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--fx-text);
  overflow-wrap: break-word;
}

.ofx-place p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--fx-muted);
}

.ofx-tip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--fx-surface-3);
  font-size: 11.5px;
  color: var(--fx-muted);
}

.ofx-tip svg {
  width: 13px;
  height: 13px;
}

.ofx-tip b {
  color: var(--fx-text);
  font-weight: 600;
}

.ofx-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.ofx-price strong {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--fx-ok-text);
  white-space: nowrap;
}

.ofx-price span {
  font-size: 12px;
  color: var(--fx-faint);
  white-space: nowrap;
}

.ofx-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ofx-accept,
.ofx-reject {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  border-radius: 11px;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.ofx-accept {
  min-width: 112px;
  padding: 0 16px;
  border: 1px solid var(--fx-ok-line);
  background: var(--fx-ok-soft);
  color: var(--fx-ok-text);
}

.ofx-accept:hover:not(:disabled) {
  background: var(--fx-ok);
  border-color: var(--fx-ok);
  color: #04130c;
}

.ofx-reject {
  position: relative;
  width: 40px;
  padding: 0;
  border: 1px solid var(--fx-line-2);
  background: transparent;
  color: var(--fx-muted);
}

.ofx-reject span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ofx-reject:hover:not(:disabled) {
  border-color: var(--fx-crit-line);
  background: var(--fx-crit-soft);
  color: var(--fx-crit-text);
}

.ofx-accept:disabled,
.ofx-reject:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ofx-accept svg,
.ofx-reject svg {
  width: 16px;
  height: 16px;
}

.customer-shell .main .panel > .station-filter-panel {
  margin-top: 10px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.customer-shell .main .station-filter-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--fx-line-2) !important;
  background: var(--fx-surface) !important;
  color: var(--fx-muted) !important;
  box-shadow: none !important;
}

.customer-shell .main .station-filter-chip small {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--fx-surface-3);
  color: var(--fx-muted);
  font-size: 11px;
  text-align: center;
}

.customer-shell .main .station-filter-chip:hover {
  border-color: var(--fx-line-3) !important;
  color: var(--fx-text) !important;
}

.customer-shell .main .station-filter-chip:is(.active, [aria-pressed="true"], .selected, .on) {
  border-color: var(--fx-accent-line) !important;
  background: var(--fx-accent-soft) !important;
  color: var(--fx-text) !important;
}

.customer-shell .main .station-filter-chip:is(.active, [aria-pressed="true"], .selected, .on) small {
  background: var(--fx-accent);
  color: #ffffff;
}

/* ── Telas médias e celular ── */
@media (max-width: 1180px) {
  .ofx-row {
    grid-template-columns: 116px minmax(0, 1fr) auto;
    grid-template-areas: "time place price" "time place actions";
    row-gap: 10px;
  }

  .ofx-time { grid-area: time; }
  .ofx-place { grid-area: place; }
  .ofx-price { grid-area: price; }
  .ofx-actions { grid-area: actions; justify-content: flex-end; }
}

@media (max-width: 640px) {
  .ofx-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "place price" "time time" "actions actions";
    gap: 12px;
    padding: 14px;
  }

  .ofx-time {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 10px 0 0;
    border-right: 0;
    border-top: 1px solid var(--fx-line);
  }

  .ofx-time strong {
    font-size: 18px;
  }

  .ofx-time em {
    margin: 0 0 0 auto;
  }

  .ofx-price strong {
    font-size: 22px;
  }

  .ofx-actions {
    justify-content: stretch;
  }

  .ofx-accept {
    flex: 1;
  }

  .ofx-reject {
    width: auto;
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .ofx-reject span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ofx-row {
    transition: none;
  }
}







/* A confirmação do Aceitar é respondida na hora: não aparece na tela. */
html.ofx-fast-accept .modal-backdrop {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* =========================================================
   Barra de filtros de Ofertas (controles originais, novo desenho).
   Filtros à esquerda (estação, valor mínimo, ordenar), contagem e
   Atualizar à direita. Sem caixa em volta: os controles são o desenho.
   ========================================================= */
.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 8px !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-divider {
  display: none !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > :is(.station-sheet-trigger, .toolbar-field, .toolbar-toggle, .btn) {
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--fx-line-2) !important;
  background: var(--fx-surface) !important;
  box-shadow: none !important;
  color: var(--fx-text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > :is(.station-sheet-trigger, .toolbar-toggle, .btn):hover {
  border-color: var(--fx-line-3) !important;
  background: var(--fx-surface-2) !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) svg {
  width: 16px !important;
  height: 16px !important;
  color: var(--fx-faint) !important;
}

/* Estação */
.customer-shell .main .panel > .toolbar > .station-sheet-trigger { order: 1; }

.customer-shell .main .panel > .toolbar > .station-sheet-trigger svg {
  color: var(--fx-accent) !important;
}

.customer-shell .main .panel > .toolbar > .station-sheet-trigger strong {
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  background: var(--fx-accent-soft) !important;
  color: var(--fx-accent-text) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

/* Valor mínimo */
.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-field { order: 2; }

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-field:focus-within {
  border-color: var(--fx-accent) !important;
  box-shadow: 0 0 0 3px var(--fx-focus) !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) .toolbar-label {
  color: var(--fx-faint) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) .toolbar-input {
  width: 72px !important;
  height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fx-text) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* Ordenar por valor/h */
.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-toggle { order: 3; }

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-toggle.on {
  border-color: var(--fx-accent-line) !important;
  background: var(--fx-accent-soft) !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-toggle.on svg {
  color: var(--fx-accent) !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) .toggle-pill {
  width: 32px !important;
  height: 18px !important;
  border: 0 !important;
  background: var(--fx-surface-3) !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) .toggle-knob {
  top: 2px !important;
  left: 2px !important;
  width: 14px !important;
  height: 14px !important;
  background: #ffffff !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-toggle.on .toggle-pill {
  background: var(--fx-accent) !important;
}

/* Contagem e Atualizar, à direita */
.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .badge {
  order: 4;
  margin: 0 4px 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--fx-faint) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .badge::before {
  display: none !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .btn {
  order: 5;
  text-shadow: none !important;
  font-weight: 600 !important;
}

.customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .btn svg {
  color: var(--fx-text) !important;
}

/* Celular: estação e ordenar em cima; Min, Mín/h, contagem e Atualizar embaixo. */
@media (max-width: 640px) {
  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: -8px 0 16px !important;
  }

  .customer-shell .main .panel > .toolbar > .station-sheet-trigger { order: 1; flex: 1 1 auto !important; justify-content: center !important; }
  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-toggle { order: 2; flex: 1 1 auto !important; min-width: 0; justify-content: flex-start !important; }
  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-toggle .toggle-pill { margin-left: auto !important; }
  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-field { order: 3; flex: 1 1 0 !important; min-width: 96px; padding: 0 10px !important; }
  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .toolbar-field.ofx-minh { order: 4; }
  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .badge { order: 5; margin: 0 2px !important; font-size: 11.5px !important; white-space: nowrap; }

  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) > .btn {
    order: 6;
    width: 40px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 0 !important;
  }

  .customer-shell .main .panel > .toolbar:has(> .station-sheet-trigger) .toolbar-input {
    width: 100% !important;
    min-width: 0;
  }
}

/* Mín/h: mesmo campo do Min original; a contagem mostrada é a ajustada. */
.customer-shell .main .panel > .toolbar > .toolbar-field.ofx-minh { order: 2; }
.customer-shell .main .panel > .toolbar > .toolbar-field.ofx-minh svg { color: var(--fx-faint) !important; }
.customer-shell .main .panel.ofx-has-count > .toolbar > .badge:not(.ofx-count) { display: none !important; }

.ofx-empty {
  margin: 0;
  padding: 22px 18px;
  border-radius: 16px;
  border: 1px dashed var(--fx-line-2);
  color: var(--fx-muted);
  font-size: 14px;
  text-align: center;
}
