@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─────────────────────────────────────────────────────
   ROADDOG FUEL PRICES — Stylesheet v2.1
   Mobile-first compact design
───────────────────────────────────────────────────── */

:root {
  --rdw-red:      #eb232d;
  --rdw-red-dk:   #a8171f;
  --rdw-card:     #ffffff;
  --rdw-border:   #e8ecf2;
  --rdw-pill:     #f3f6fb;
  --rdw-text:     #1f2937;
  --rdw-muted:    #6b7280;
  --rdw-faint:    #9ca3af;
  --rdw-c-reg:    #059669;
  --rdw-c-plus:   #2563eb;
  --rdw-c-prem:   #7c3aed;
  --rdw-c-diesel: #b45309;
  --rdw-c-eth:    #059669;
  --rdw-f:        'Nunito', sans-serif;
}

/* ── Savings banner ─────────────────────────────────── */
.rdw-savings-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--rdw-card);
  border: 1px solid var(--rdw-border);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

.rdw-sb-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rdw-red), var(--rdw-red-dk));
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}

.rdw-sb-title {
  font: 800 .58rem/1 var(--rdw-f);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rdw-faint);
  margin-bottom: 2px;
}

.rdw-sb-val {
  font: 700 .82rem/1.2 var(--rdw-f);
  color: var(--rdw-text);
}

.rdw-sb-val strong { color: var(--rdw-red); }

/* ── Station grid ───────────────────────────────────── */
/* Mobile-first: single column */
.stations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

/* 2 cols at 600px+ */
@media (min-width: 600px) {
  .stations-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* 3 cols at 960px+ */
@media (min-width: 960px) {
  .stations-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

/* ── Station card ───────────────────────────────────── */
.station-card {
  background: var(--rdw-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,.07);
  transition: box-shadow .2s;
}

.station-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.11);
}

/* ── Card header ────────────────────────────────────── */
.station-header {
  background: linear-gradient(135deg, var(--rdw-red), var(--rdw-red-dk));
  padding: 10px 12px 9px;
}

.station-name {
  font: 800 .92rem/1.2 var(--rdw-f);
  color: #fff;
  margin-bottom: 3px;
}

.station-location { display: flex; align-items: center; }

.location-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font: 600 .7rem/1 var(--rdw-f);
  transition: color .15s;
}

.location-link:hover { color: #fff; }

.location-icon {
  width: 10px; height: 10px;
  fill: currentColor; flex-shrink: 0;
}

/* Member savings badge inside card header */
.station-mbr-badge {
  margin-top: 7px;
  background: rgba(255,255,255,.15);
  border-radius: 50px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.station-mbr-badge span {
  font: 700 .65rem/1 var(--rdw-f);
  color: #fff;
}

/* ── Price rows ─────────────────────────────────────── */
.price-grid {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fuel-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--rdw-pill);
  border-radius: 8px;
  padding: 7px 10px;
  border-left: 3px solid;
}

.fuel-row.regular      { border-left-color: var(--rdw-c-reg); }
.fuel-row.plus         { border-left-color: var(--rdw-c-plus); }
.fuel-row.premium      { border-left-color: var(--rdw-c-prem); }
.fuel-row.diesel       { border-left-color: var(--rdw-c-diesel); }
.fuel-row.ethanol-free { border-left-color: var(--rdw-c-eth); }

.fuel-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fuel-name {
  font: 700 .82rem/1 var(--rdw-f);
  color: var(--rdw-text);
}

.fuel-octane {
  background: #e9edf4;
  border-radius: 50px;
  padding: 1px 6px;
  font: 800 .58rem/1.4 var(--rdw-f);
  color: var(--rdw-muted);
}

/* ── Price stack ────────────────────────────────────────── */
.fuel-price-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.fuel-price {
  font: 900 1.05rem/1 var(--rdw-f);
  display: flex;
  align-items: baseline;
}

.fuel-row.regular .fuel-price      { color: var(--rdw-c-reg); }
.fuel-row.plus .fuel-price         { color: var(--rdw-c-plus); }
.fuel-row.premium .fuel-price      { color: var(--rdw-c-prem); }
.fuel-row.diesel .fuel-price       { color: var(--rdw-c-diesel); }
.fuel-row.ethanol-free .fuel-price { color: var(--rdw-c-eth); }

.price-dollar   { font-size: .72em; }
.price-cents    { font-size: .7em; margin-left: 1px; }
.price-fraction { font-size: .5em; vertical-align: super; }

/* Member price pill */
.rdw-mbr-price-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 50px;
  padding: 1px 7px;
}

.rdw-mpp-star { font-size: .52rem; }

.rdw-mpp-label {
  font: 800 .52rem/1 var(--rdw-f);
  color: var(--rdw-c-reg);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.rdw-mpp-val {
  font: 900 .75rem/1 var(--rdw-f);
  color: var(--rdw-c-reg);
}

/* ── Flash sale ribbon ──────────────────────────────────── */

/* Ribbon is positioned relative to the card, not the header,
   so the header's border-radius + overflow doesn't clip it */
.station-card { position: relative; }

.rdw-flash-ribbon {
  position: absolute;
  top: 12px;
  right: -20px;
  width: 120px;
  background: #f59e0b;
  color: #1f2937;
  font: 800 .58rem/1 var(--rdw-f);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 0;
  transform: rotate(32deg);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  pointer-events: none;
  z-index: 3;
}

.rdw-flash-ribbon span { display: block; }

/* ── No prices ──────────────────────────────────────── */
.no-prices {
  padding: 18px 10px;
  text-align: center;
  border: 1px dashed rgba(235,35,45,.22);
  border-radius: 8px;
  margin: 8px 10px;
}

.no-prices-title {
  font: 700 .82rem/1 var(--rdw-f);
  color: var(--rdw-red);
  margin-bottom: 3px;
}

.no-prices-message {
  font: 400 .7rem/1 var(--rdw-f);
  color: var(--rdw-faint);
}

/* ── Store ID footer ────────────────────────────────── */
.store-id {
  padding: 5px 12px;
  background: #f8fafc;
  border-top: 1px solid var(--rdw-border);
  text-align: center;
  font: 600 .62rem/1.4 var(--rdw-f);
  color: var(--rdw-faint);
  letter-spacing: .2px;
}

/* ── Notices ────────────────────────────────────────── */
.rdw-notice {
  background: rgba(235,35,45,.07);
  border: 1px solid rgba(235,35,45,.18);
  color: #dc2626;
  padding: 10px 13px;
  border-radius: 8px;
  margin-bottom: 10px;
  font: 600 .8rem/1.5 var(--rdw-f);
}

.rdw-notice-warning {
  background: rgba(234,179,8,.07);
  border-color: rgba(234,179,8,.25);
  color: #854d0e;
}

/* ── Disclaimer bar ─────────────────────────────────── */
.rdw-disclaimer-bar {
  background: linear-gradient(135deg, #1e2a38, #2d3e52);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 9px 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

.rdw-disclaimer-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rdw-disclaimer-icon {
  width: 15px; height: 15px;
  fill: var(--rdw-red);
  flex-shrink: 0;
}

.rdw-disclaimer-label {
  flex: 1;
  font: 500 .72rem/1.3 var(--rdw-f);
  color: rgba(255,255,255,.65);
}

.rdw-disclaimer-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--rdw-red);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 11px;
  font: 700 .7rem/1 var(--rdw-f);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.rdw-disclaimer-btn:hover { background: var(--rdw-red-dk); }

/* Hide label text on very small screens, keep button */
@media (max-width: 400px) {
  .rdw-disclaimer-label { display: none; }
}

/* ── Modal ──────────────────────────────────────────── */
.rdw-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,18,30,.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 99999;
  align-items: flex-end; /* sheet from bottom on mobile */
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.rdw-modal-overlay.rdw-modal-open {
  display: flex;
  animation: rdwFadeIn .18s ease;
}

@keyframes rdwFadeIn { from{opacity:0} to{opacity:1} }

.rdw-modal {
  background: #fff;
  border-radius: 20px 20px 0 0; /* bottom sheet on mobile */
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
  animation: rdwSheetUp .22s ease;
}

@keyframes rdwSheetUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* On larger screens: centred dialog */
@media (min-width: 560px) {
  .rdw-modal-overlay { align-items: center; padding: 20px; }
  .rdw-modal {
    border-radius: 20px;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,.22);
  }
}

/* Drag handle hint */
.rdw-modal-header::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: rgba(255,255,255,.35);
  border-radius: 2px;
  margin: 0 auto 12px;
}

@media (min-width: 560px) {
  .rdw-modal-header::before { display: none; }
}

.rdw-modal-header {
  background: linear-gradient(135deg, var(--rdw-red), var(--rdw-red-dk));
  padding: 14px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  flex-direction: column; /* stacked on mobile */
}

@media (min-width: 560px) {
  .rdw-modal-header { flex-direction: row; }
}

.rdw-modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.rdw-modal-header-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.2);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

.rdw-modal-title {
  font: 800 .95rem/1.2 var(--rdw-f);
  color: #fff;
  margin: 0;
  flex: 1;
}

.rdw-modal-title-sub {
  font: 500 .65rem/1 var(--rdw-f);
  color: rgba(255,255,255,.65);
  display: block;
  margin-top: 2px;
}

.rdw-modal-close {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.18);
  border: none; border-radius: 50%;
  font-size: .85rem; color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
  font-family: var(--rdw-f);
  align-self: flex-start;
}

.rdw-modal-close:hover { background: rgba(255,255,255,.28); }

.rdw-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  -webkit-overflow-scrolling: touch;
}

.rdw-modal-callout {
  background: #f8fafc;
  border-left: 4px solid var(--rdw-red);
  border-radius: 0 8px 8px 0;
  padding: 10px 13px;
  font: 700 .8rem/1.5 var(--rdw-f);
  color: var(--rdw-text);
}

.rdw-modal-section-title {
  font: 800 .6rem/1 var(--rdw-f);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rdw-red);
  margin-bottom: 4px;
}

.rdw-modal-section p {
  font: 500 .78rem/1.6 var(--rdw-f);
  color: var(--rdw-muted);
  margin: 0;
}

.rdw-modal-footer {
  padding: 10px 18px 16px;
  border-top: 1px solid var(--rdw-border);
  display: flex;
  justify-content: stretch;
  flex-shrink: 0;
}

/* Full-width button on mobile */
.rdw-modal-close-btn {
  flex: 1;
  background: var(--rdw-red);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font: 800 .88rem/1 var(--rdw-f);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(235,35,45,.28);
  transition: background .15s;
}

.rdw-modal-close-btn:hover { background: var(--rdw-red-dk); }

@media (min-width: 560px) {
  .rdw-modal-footer { justify-content: flex-end; }
  .rdw-modal-close-btn { flex: none; padding: 10px 28px; }
}
