/* ============================================
   GasBuddy Widget Modernization CSS
   ============================================
   Overrides inline styles from GasBuddy embeds.
   Uses !important throughout because the widgets
   inject heavy inline styles.
   ============================================ */

/* --- Base / Reset --- */
.gas-buddy, .gas-buddy-1, .gas-buddy-2, .gas-buddy-3,
.panel-group, .panel-group-1, .panel-group-3,
.fuel-tips {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* --- Section headings --- */
.gas-buddy h2,
.gas-buddy-1 h2,
.gas-buddy-2 h2,
.gas-buddy-3 h2,
#gas-buddy h2,
#gas-buddy-1 h2,
#gas-buddy-2 h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  color: #1a1a2e !important;
  margin-bottom: 1rem !important;
  letter-spacing: -0.01em;
}

#gas-buddy h2 font,
#gas-buddy-1 h2 font,
#gas-buddy-2 h2 font {
  font-size: inherit !important;
  font-family: inherit !important;
}

#tenlowest_title {
  font-weight: 400 !important;
  color: #555 !important;
  font-size: 0.85em !important;
}


/* ===========================================
   1. PRICE TRENDS TABLE (#PF_tbl)
   =========================================== */

#PF_tbl {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 14px !important;
  width: 100% !important;
  max-width: 480px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Header row */
#PF_tbl tr:first-child td,
#PF_hdr0, #PFhdr1, #hdr2, #hdr3 {
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 12px 16px !important;
  border: none !important;
}

/* Data cells */
#PF_tbl tr:nth-child(2) td {
  background-color: #ffffff !important;
  color: #333 !important;
  padding: 14px 16px !important;
  border: none !important;
  font-size: 14px !important;
  line-height: 2 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

#PF_tbl span[id^="PF_city"],
#PF_tbl span[id^="PF_country"] {
  font-variant-numeric: tabular-nums !important;
  font-weight: 500 !important;
  color: #1a1a2e !important;
}

/* Trend image */
#PF_tbl span[id^="PF_Trendimg"] img {
  width: 28px !important;
  opacity: 0.8;
}


/* ===========================================
   2. NATIONAL GAS PRICE AVERAGES (#gasbuddy_579)
   =========================================== */

#divGB579 > table {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05) !important;
  width: 100% !important;
  max-width: 520px !important;
}

/* Main header */
#divGB579 > table > tbody > tr:first-child > td {
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: 0.02em !important;
  padding: 14px 16px !important;
  text-transform: uppercase !important;
}

/* Inner content cells */
#divGB579 table table {
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-color: #fafafa !important;
}

/* Labels */
#divGB579 span[id^="Nat"],
#divGB579 td[style*="font-family"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  color: #444 !important;
}

/* Yellow price highlight boxes -> modern accent */
#divGB579 table[style*="background-color:Yellow"],
#divGB579 table[style*="background-color: Yellow"] {
  background-color: #e8f5e9 !important;
  border: 1px solid #c8e6c9 !important;
  border-radius: 8px !important;
}

#divGB579 table[style*="background-color:Yellow"] td,
#divGB579 table[style*="background-color: Yellow"] td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #2e7d32 !important;
  padding: 8px 14px !important;
}

/* Footer logo */
#divGB579 img[id^="Natftr_img"] {
  opacity: 0.5;
  max-height: 24px !important;
  margin: 8px 0 !important;
}


/* ===========================================
   3. LOWEST GAS PRICES TABLE (#prices)
   =========================================== */

#prices {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05) !important;
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Header row */
#prices > tbody > tr:first-child {
  background-color: #1a1a2e !important;
}

#prices > tbody > tr:first-child td {
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 12px 14px !important;
  border: none !important;
}

/* Data rows */
#prices > tbody > tr[id^="trGB"] {
  background-color: #ffffff !important;
  transition: background-color 0.15s ease !important;
}

#prices > tbody > tr[id^="trGB"]:hover {
  background-color: #f5f7ff !important;
}

/* Alternate row striping */
#prices > tbody > tr[id^="trGB"]:nth-child(odd) {
  background-color: #fafbff !important;
}

#prices > tbody > tr[id^="trGB"]:nth-child(odd):hover {
  background-color: #f0f2ff !important;
}

/* Data cells */
#prices > tbody > tr[id^="trGB"] td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  color: #333 !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  vertical-align: middle !important;
}

/* Price column */
#prices span[id*="Price"] {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #1a1a2e !important;
  font-variant-numeric: tabular-nums !important;
}

/* Station name links */
#prices span[id*="StationNm"] a {
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

#prices span[id*="StationNm"] a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

/* Address text */
#prices span[id*="Address"] {
  color: #888 !important;
  font-size: 12px !important;
}

/* City links */
#prices span[id*="Area"] a {
  color: #555 !important;
  text-decoration: none !important;
}

#prices span[id*="Area"] a:hover {
  text-decoration: underline !important;
}

/* Time column */
#prices span[id*="Tme"] {
  color: #888 !important;
  font-size: 12px !important;
}

/* Last row - remove bottom border */
#prices > tbody > tr:last-child td {
  border-bottom: none !important;
}


/* ===========================================
   4. PRICE CHART (#gasbuddy_12690)
   =========================================== */

#divGB12690 {
  background: #ffffff !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05) !important;
  padding: 16px !important;
}

#divGB12690 > table:first-child {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  border: none !important;
}

/* Quick chart period links */
#divGB12690 td[id^="period"] {
  padding: 8px 0 16px !important;
}

#divGB12690 td[id^="period"] a {
  color: #2563eb !important;
  text-decoration: none !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  transition: background-color 0.15s ease !important;
  font-weight: 500 !important;
  font-size: 13px !important;
}

#divGB12690 td[id^="period"] a:hover {
  background-color: #eff3ff !important;
  color: #1d4ed8 !important;
}

/* Chart image */
#divGB12690 img[id^="chart"] {
  border-radius: 8px !important;
  max-width: 100% !important;
  height: auto !important;
}

/* Customize table */
#divGB12690 table[style*="border:1px solid black"] {
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  margin-top: 12px !important;
}

#divGB12690 table[style*="border:1px solid black"] th {
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

#divGB12690 table[style*="border:1px solid black"] td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  padding: 8px 12px !important;
}

#divGB12690 select {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  padding: 6px 10px !important;
  border: 1px solid #d0d0d0 !important;
  border-radius: 6px !important;
  background-color: #fff !important;
  appearance: auto !important;
}

#divGB12690 input[type="submit"],
#divGB12690 input[type="button"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border: none !important;
  border-radius: 6px !important;
  background-color: #2563eb !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease !important;
}

#divGB12690 input[type="submit"]:hover,
#divGB12690 input[type="button"]:hover {
  background-color: #1d4ed8 !important;
}


/* ===========================================
   5. SIDE WIDGETS (#gasbuddy_424, #gasbuddy_430)
   =========================================== */

div[id^="divGB424"],
div[id^="divGB430"] {
  background: #ffffff !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05) !important;
}

#gasbuddy_424 table,
#gasbuddy_430 table {
  border: none !important;
  background-color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

#gasbuddy_424 table td,
#gasbuddy_430 table td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  border: none !important;
  color: #333 !important;
}

/* Headers in side widgets */
#gasbuddy_424 td[style*="background-color:#003366"],
#gasbuddy_430 td[style*="background-color:#003366"],
#gasbuddy_424 td[style*="background-color: #003366"],
#gasbuddy_430 td[style*="background-color: #003366"] {
  background-color: #1a1a2e !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 600 !important;
  padding: 10px 12px !important;
  border-radius: 0 !important;
}

/* Yellow boxes in side widgets */
#gasbuddy_424 table[style*="background-color:Yellow"],
#gasbuddy_430 table[style*="background-color:Yellow"],
#gasbuddy_424 table[style*="Yellow"],
#gasbuddy_430 table[style*="Yellow"] {
  background-color: #e8f5e9 !important;
  border: 1px solid #c8e6c9 !important;
  border-radius: 8px !important;
}

#gasbuddy_424 table[style*="Yellow"] td,
#gasbuddy_430 table[style*="Yellow"] td {
  color: #2e7d32 !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
}


/* ===========================================
   6. MAP IFRAME
   =========================================== */

#gasbuddy_map_11848 iframe {
  border-radius: 12px !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  max-width: 100% !important;
}


/* ===========================================
   7. BOTTOM TABLES (#gasbuddy_396, etc.)
   =========================================== */

.clean_table table,
#gasbuddy_396 table,
#gasbuddy_12673 table {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.clean_table td,
#gasbuddy_396 td,
#gasbuddy_12673 td {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  color: #333 !important;
}

.clean_table th,
#gasbuddy_396 th,
#gasbuddy_12673 th,
.clean_table td[style*="background-color:#003366"],
#gasbuddy_396 td[style*="background-color:#003366"],
#gasbuddy_12673 td[style*="background-color:#003366"] {
  background-color: #1a1a2e !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 10px 14px !important;
}


/* ===========================================
   8. "PROVIDED BY" / ATTRIBUTION LINKS
   =========================================== */

div[id^="gasbuddy"] > div > span[style*="font-weight: bold"],
div[id^="gasbuddy"] > div > span[style*="font-weight:bold"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  color: #999 !important;
  display: block !important;
  margin-top: 8px !important;
}

div[id^="gasbuddy"] > div > span a,
.gas-buddy a[href*="gasbuddy.com"],
.gas-buddy-1 a[href*="gasbuddy.com"],
.gas-buddy-2 a[href*="gasbuddy.com"] {
  color: #999 !important;
  text-decoration: none !important;
}

div[id^="gasbuddy"] > div > span a:hover {
  color: #666 !important;
}

/* Fuel saving tips link */
div[style*="font-size:11px"] a[href*="tips.aspx"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: #2563eb !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

div[style*="font-size:11px"] a[href*="tips.aspx"]:hover {
  text-decoration: underline !important;
}


/* ===========================================
   9. GASBUDDY LOGO IMAGES
   =========================================== */

img[src*="fueled-by-gasbuddy"],
img[src*="gasbuddy-logo"] {
  opacity: 0.4 !important;
  max-height: 22px !important;
  transition: opacity 0.15s ease !important;
}

img[src*="fueled-by-gasbuddy"]:hover,
img[src*="gasbuddy-logo"]:hover {
  opacity: 0.7 !important;
}


/* ===========================================
   10. GENERAL OVERRIDES FOR ALL WIDGET TABLES
   =========================================== */

/* Override all #EEEEFF backgrounds */
div[id^="gasbuddy"] td[style*="background-color:#EEEEFF"],
div[id^="gasbuddy"] tr[style*="background-color:#EEEEFF"],
div[id^="divGB"] td[style*="background-color:#EEEEFF"],
div[id^="divGB"] tr[style*="background-color:#EEEEFF"] {
  background-color: #ffffff !important;
}

/* Override all #003366 navy headers */
div[id^="gasbuddy"] td[style*="background-color:#003366"],
div[id^="gasbuddy"] tr[style*="background-color:#003366"],
div[id^="divGB"] td[style*="background-color:#003366"],
div[id^="divGB"] tr[style*="background-color:#003366"] {
  background-color: #1a1a2e !important;
}

/* Override Verdana everywhere */
div[id^="gasbuddy"] *[style*="font-family:Verdana"],
div[id^="divGB"] *[style*="font-family:Verdana"],
div[id^="gasbuddy"] *[style*="font-family: Verdana"],
div[id^="divGB"] *[style*="font-family: Verdana"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Override font tags */
.gas-buddy font,
.gas-buddy-1 font,
.gas-buddy-2 font,
.gas-buddy-3 font,
.fuel-tips font {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Global link styling inside widgets */
div[id^="gasbuddy"] a {
  transition: color 0.15s ease !important;
}
