*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.mappage, .mappage body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #05060a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.listpage body {
  color: #e4e4e7;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}



  #map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  /* Overlay UI */
  #ui-overlay {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
    pointer-events: none;
  }

  .map-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    cursor: pointer;
    border: none;
    white-space: nowrap;
  }

  .map-badge:active {
    background: rgba(240, 240, 240, 0.95);
  }

  /* Custom controls position */
  .mapboxgl-ctrl-bottom-right {
    bottom: env(safe-area-inset-bottom, 16px);
    right: 16px;
  }

  .mapboxgl-ctrl-bottom-left {
    bottom: env(safe-area-inset-bottom, 16px);
    left: 16px;
  }

  /* Loading screen */
  #loading {
    position: fixed;
    inset: 0;
    background: #2e1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    gap: 16px;
  }

  #loading.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

#sitelogo {
  font-family: Courier;
  letter-spacing: 1px;
  color: #eee;
  background-color: black;
  border-radius: 8px;
  pointer-events: initial;
  text-decoration: none;
}

.diesel#sitelogofuel {
  font-style: italic;
}

.listpage #sitelogo {
  font-size: 28px;
  padding: 5px 0 20px 0;
}

.mappage #sitelogo {
  font-size: 22px;
  padding: 5px 20px;
}


#sitelogolive {
    color: #e33;
}

.dim {
  color: #a1a1aa
}

  #zoomwarning {
    color: black;
    display: none;
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);

    font-size: 16px;
    background-color: white;
    text-align: center;
    padding: 15px 30px;
    border: solid #ddd 0.5px;
    border-radius: 999px;
    z-index: 1000;
  }

  .mappage #last-refreshed {
    position: fixed;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
  }

.listpage #last-refreshed {
  margin-top: 1em;
  margin-bottom: 1em;
}


  #last-refreshed {
    font-family: Courier;
    color: white;
    background-color: black; 
  }


  .listpage #aboutbutton {
    float: right;
  }

  .mapboxgl-popup-content {
    font: 14px Tahoma, Helvetica Neue,Arial,Helvetica,sans-serif;
    color: black;
  }

  .mapboxgl-popup-content p {
    margin-bottom: 5px;
  }

  #aboutbutton {
      margin: 4px;
      padding: 4px 8px;
      font-family: Courier;
      border: 1px solid #444;
      border-radius: 4px;
      font-size: 16px;
      background: black;
      color: red;
      cursor: pointer;
  }

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
  }
  
  .modal {
    background: #eee;
    color: black;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
  }

  .modal-body .card {
    margin-top: 0px;
    box-shadow: 0 5px 5px rgba(0,0,0,.45);
    margin-bottom: 30px;
  }

  .modal-header {
    font-family: Courier;
    padding: 15px 20px;
    border-bottom: 1px solid black;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .close-button {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    border: none;
    background: none;
  }

  .close-button:hover {
    color: #333;
  }
  
  .modal-body {
    padding: 20px;
    line-height: 1.6;
  }
  
  .modal-body p {
    margin-top: 5px;
  }

  .modal-body .card {
    color: white;
    text-align: center;
    font-family: Courier
  }


  .loading-text {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    letter-spacing: 1px;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Safe area padding for notched phones */
  .mapboxgl-ctrl-top-left {
    top: env(safe-area-inset-top, 0px);
    left: env(safe-area-inset-left, 0px);
  }

  .mapboxgl-ctrl-top-right {
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
  }

:root {
  color-scheme: dark;
}

.page {
  width: 100%;
  max-width: 960px;
}



header {
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 1rem;
  margin-bottom: .4rem;
  color: #f4f4f5;
}

.subtitle {
  font-size: .95rem;
  color: #a1a1aa;
}

.card {
  background: #19191b;
  border-radius: .75rem;
  border: 1px solid #27272a;
  box-shadow: 0 18px 35px rgba(0,0,0,.45);
  margin-top: 20px;
}

.roadpage .card {
  margin-top: 40px;
  margin-bottom: 40px;
}


.card-header {
  padding: .9rem 1.1rem;
  background-color: #29292b;
  border-radius: .75rem .75rem 0 0;
  border-bottom: 1px solid #27272a;
}

.sticky {
  position: sticky;
  top: 0;
  z-index: 1;
}

.sticky .card-header {
  align-items: center;
  justify-content: space-between;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.card-title {
  font-size: .95rem;
  font-weight: 600;
  color: #e4e4e7;
}

.card-meta {
  font-size: .8rem;
  color: #71717a;
  text-align: right;
}

.empty-junction {
  padding: 1.4rem;
  color: #a1a1aa;
  font-style: italic;
  font-size: .9rem;
}

.empty-state {
  padding: 1.4rem;
  text-align: center;
  color: #a1a1aa;
  font-style: italic;
  font-size: .9rem;
}

.postcode-grid {
  padding: .9rem 1.1rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

a.postcode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem .8rem;
  border-radius: 999px;
  background: #18181b;
  color: #e4e4e7;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid #27272a;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  transition: background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .05s ease;
}

a.postcode-pill:hover {
  background: #1f2937;
  border-color: #3b82f6;
  box-shadow: 0 8px 18px rgba(37,99,235,.4);
}

a.postcode-pill:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(15,23,42,.7);
}

a.postcode-pill:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 3px;
}

#locationbutton {
  margin: 4px;
  font-size: 16px;
}

#fuelselector {
  margin: 4px;
    position: relative;
  display: inline-block;
}


#fuelselector select {
  font-weight: 600;
  padding: 0.75rem 2.5rem 0.75rem 1.5rem;
  border-radius: 9999px;
  border: none;
  background-color: #e53935;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 15px 9px;
}

/* Hide default arrow in old IE/Edge */
  #fuelselector select::-ms-expand {
  display: none;
}

a.button {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  margin-left: 10px;
  border-radius: 999px;
  background: #e33;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease,
      box-shadow 0.15s ease,
      transform 0.05s ease;
}


.bigbutton {
  margin: 20px 0;
}

.bigbutton a, #locationbutton {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin-right: 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #e33;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease,
      box-shadow 0.15s ease,
      transform 0.05s ease;
}

.bigbutton a:hover, #locationbutton a:hover, a.button:hover {
  background: #a22;
  box-shadow: 0 8px 18px rgba(255, 0, 0, 0.1);
  text-decoration: none;
}

.bigbutton a:active, #locationbutton a:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.6);
}

.bigbutton a:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .75rem;
  background: rgba(34,197,94,.12);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.45);
}

.badge-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.32);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: rgba(40,40,40,0.7);
  backdrop-filter: blur(10px);
  position: sticky;
}

th, td {
  padding: .7rem .9rem;
  text-align: left;
}

.postcodecol {
  width: 3rem;
}

.pricecol, .infocol {
  width: 7rem;
}

.junctioncol {
  width: 6rem;
}

th {
  font-weight: 500;
  letter-spacing: .02em;
  color: #a1a1aa;
  border-bottom: 1px solid #27272a;
  font-size: .85rem;
  text-transform: uppercase;
}

td {
  border-bottom: 1px solid #18181b;
}

.road.headings {
  position: sticky;
  top: 0;
  z-index: 100;
}

tbody tr:nth-child(even) {
  background: rgba(40,40,40,.5);
}

tbody tr:hover {
  background: rgba(60,60,60,.9);
  cursor: pointer;
}

tbody tr:hover a {
  text-decoration: underline;
}

.road tr.junction td {
  padding-top: 3rem;
  padding-bottom: 0.3rem;
  font-size: 1rem;
}

.station-name {
  font-weight: 500;
  color: #fafafa;
}

.station-brand {
  font-size: .85rem;
  padding-top: 0.1rem;
  color: #a1a1aa;
}

.station-distance {
  padding-top: 0.3rem;
  font-style: italic;
    color: #a1a1aa;
}


.price {
  font-size: 1.0rem;
  color: black;
  padding: 5px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  position: relative;
}


.price.verified::after, .price.warning::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  bottom: -5px; 
  right: -5px;   
  background-size: contain;
  background-repeat: no-repeat;
}

.desc.verified::before, .desc.warning::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  background-size: contain;
  background-repeat: no-repeat;
}

.realtext {
  line-height: 1.5;
  padding: 1em;
  background: rgba(24,24,27);
  border-radius: .75rem;
  border: 1px solid #27272a;
  box-shadow: 0 18px 35px rgba(0,0,0,.45);
  
}

.realtext ul {
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
  padding-inline-start: 40px;
  
}

.type_msa {
  display: block;
  float: left;
  width: 16px;
  height: 16px;
  margin-right: 3px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="562" height="562.4" viewBox="0 0 449.5 449.8"><rect width="436" height="436.3" x="6.8" y="6.8" ry="75.5" style="fill:%230079c1;fill-opacity:1;stroke:%23fff;stroke-width:13.5428;stroke-linejoin:bevel;stroke-dasharray:none"/><path d="M219 70h-31l-16 82h44zM50 173v26h29q11 3 12 13v32l25 1 8-36q3-9 12-10h196q10 1 13 10l7 36 26-1v-32q1-10 11-13h30v-26z" style="fill:%23fff;stroke:none" transform="translate(-9 -9)"/><path d="M214 222h-56l-35 176h85zm36-152h31l16 82h-45zm5 152h56l34 176h-85z" style="fill:%23fff;stroke:none" transform="translate(-9 -9)"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;

}


.price.verified::after, .desc.verified::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%231BCB50'/%3E%3Cpath fill='%23FFFFFF' d='M10.25 17.5l-4.5-4.5 1.5-1.5 3 3 7.5-7.5 1.5 1.5-9 9z'/%3E%3C/svg%3E");
}

.price.warning::after, .desc.warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FE9000' d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Crect x='10.75' y='7' width='2.5' height='6' rx='1.25' fill='%23FFFFFF'/%3E%3Ccircle cx='12' cy='16.25' r='1.5' fill='%23FFFFFF'/%3E%3C/svg%3E");
}

.address {
  font-size: .78rem;
  color: #a1a1aa;
}


.cheapest-row {
  box-shadow: inset 3px 0 0 #22c55e;
}

a {
  color: #e33;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

table.road, table.arealist, table.stationlist {
  table-layout: fixed;
}


@media (max-width: 720px) {
  #fuelselector, #locationbutton {
    margin-top: 50px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  table {
    font-size: 1rem;
  }

  th, td {
    padding: .7rem .4rem;
  }
  
  .listpage body {
    padding: 1rem 0rem;
  }

  .postcodecol {
    width: 2rem;
  }

  .postcodecol {
    font-size: 0.1px;
    text-indent: -9999px;
  }

  .pricecol {
    width: 4.5rem;
  }

  .pricecol {
    width: 5rem;
  }



  .junctioncol {
    width: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    lefT: -9999px;
  }

}


@media (max-width: 600px) {
  .infocol {
    width: 0;
  }
}

.footer {
  margin-top: 20px;
  color: #a1a1aa;
  font-size: .9rem;
}

@media (max-width: 850px) {
  .highestprice {
    font-size: 0.1px;
    text-indent: -9999px;
    width: 0rem;
  }
}