/* Gasoline Prices Page, Table, Controls, Badges */

/* Table controls bar */
.gas-table-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.gas-table-filter label,
.gas-table-search label {
  display: block;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.gas-table-filter select,
.gas-table-search input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: var(--text-sm, 0.875rem);
  min-width: 160px;
}

.gas-table-filter select:focus,
.gas-table-search input:focus {
  outline: none;
  border-color: var(--accent-primary, #0ea5e9);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

/* Table wrapper for horizontal scroll on mobile */
.gas-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

/* Main table */
.gas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
}

.gas-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.gas-table th {
  background: var(--bg-surface, #1e293b);
  color: var(--text-secondary);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.625rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--border-subtle);
  white-space: nowrap;
  user-select: none;
}

.gas-table__th--sortable:hover {
  color: var(--accent-primary, #0ea5e9);
}

.gas-table__th--active {
  color: var(--accent-primary, #0ea5e9);
}

.gas-table__th--rank {
  width: 3rem;
  text-align: center;
}

.gas-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.gas-table tbody tr:hover {
  background: rgba(14, 165, 233, 0.04);
}

/* U.S. row highlight */
.gas-table__row--us {
  background: rgba(14, 165, 233, 0.06);
  font-weight: 500;
}

.gas-table__row--us:hover {
  background: rgba(14, 165, 233, 0.1);
}

/* Price column */
.gas-table__price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.gas-table__local {
  color: var(--text-secondary);
  font-size: var(--text-xs, 0.75rem);
  white-space: nowrap;
}

.gas-table__source {
  color: var(--text-secondary);
  font-size: var(--text-xs, 0.75rem);
}

/* Flag emoji */
.gas-flag {
  font-size: 1.125rem;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* LIVE badge on U.S. row */
.gas-live-badge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-primary, #0ea5e9);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* Table footnote */
.gas-table-note {
  font-size: var(--text-xs, 0.75rem);
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* FAQ styling */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: var(--text-base, 1rem);
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 640px) {
  .gas-table-controls {
    flex-direction: column;
  }

  .gas-table-filter select,
  .gas-table-search input {
    width: 100%;
    min-width: unset;
  }

  .gas-table__th--local,
  .gas-table__local,
  .gas-table__th--source,
  .gas-table__source {
    display: none;
  }

  .gas-table th,
  .gas-table td {
    padding: 0.375rem 0.5rem;
  }

  .gas-table {
    font-size: var(--text-xs, 0.75rem);
  }
}

/* Currency change indicators, positive (green) and negative (red) */
.gas-change--up { color: #22c55e; }
.gas-change--down { color: #ef4444; }
