/* Final award badge override: keep the real badge visible above older pseudo-image rules. */
body .hero-card::after {
  content: none !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: none !important;
}

body .hero-card > img.hero-award-badge {
  position: absolute !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  top: 12px !important;
  right: calc(50% - 178px) !important;
  width: clamp(52px, 6.9vw, 63px) !important;
  min-width: 52px !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  clip-path: circle(49% at 50% 50%) !important;
  object-fit: cover !important;
  overflow: hidden !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, .30)) !important;
  z-index: 50 !important;
  pointer-events: none !important;
  margin: 0 !important;
  transform: none !important;
}

@media (max-width: 520px) {
  body .hero-card > img.hero-award-badge {
    top: 9px !important;
    right: clamp(33px, calc(50% - 147px), 55px) !important;
    width: clamp(45px, 12.6vw, 52px) !important;
    min-width: 45px !important;
  }
}

/* Keep the premium closest-stop pin sharp without runtime presentation JS. */
.closest-card .closest-route .closest-pin-mark-medallion .closest-pin-mark-icon,
.closest-card .closest-route .closest-medallion.closest-pin-mark-medallion img,
.closest-card .closest-location-loader-icon img {
  content: url("assets/roaming-bean-pin-premium-proper.svg?v=4") !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  image-rendering: auto !important;
  transform: none !important;
  -webkit-transform: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  will-change: auto !important;
  contain: none !important;
}

@media (max-width: 640px) {
  .closest-card .closest-route .closest-pin-mark-medallion,
  .closest-card .closest-route .closest-medallion.closest-pin-mark-medallion {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    filter: none !important;
    -webkit-filter: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: auto !important;
  }

  .closest-card .closest-route .closest-pin-mark-medallion .closest-pin-mark-icon,
  .closest-card .closest-route .closest-medallion.closest-pin-mark-medallion img,
  .closest-card .closest-loading-route .closest-loading-badge.closest-pin-mark-medallion .closest-pin-mark-icon {
    width: 88px !important;
    height: 88px !important;
    max-width: none !important;
    object-fit: contain !important;
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    image-rendering: auto !important;
    will-change: auto !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .closest-card .closest-route .closest-pin-mark-medallion,
  .closest-card .closest-route .closest-medallion.closest-pin-mark-medallion,
  .closest-card .closest-loading-route .closest-loading-badge.closest-pin-mark-medallion,
  .closest-location-loader-icon {
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    will-change: auto !important;
  }

  .closest-card .closest-route .closest-pin-mark-medallion .closest-pin-mark-icon,
  .closest-card .closest-route .closest-medallion.closest-pin-mark-medallion img,
  .closest-card .closest-loading-route .closest-loading-badge.closest-pin-mark-medallion .closest-pin-mark-icon,
  .closest-location-loader-icon img {
    transform: none !important;
    -webkit-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    image-rendering: auto !important;
    will-change: auto !important;
    contain: none !important;
  }
}

/* Keep the Burgh badge aligned to the smaller hero artwork. */
body .hero-card > img.hero-award-badge {
  top: 10px !important;
  right: calc(50% - 164px) !important;
  width: clamp(50px, 6.4vw, 59px) !important;
  min-width: 50px !important;
}

@media (max-width: 520px) {
  body .hero-card > img.hero-award-badge {
    top: 8px !important;
    right: clamp(44px, calc(50% - 134px), 66px) !important;
    width: clamp(43px, 11.8vw, 49px) !important;
    min-width: 43px !important;
  }
}

/* Desktop badge follows the larger hero art; mobile placement above is intentionally unchanged. */
@media (min-width: 641px) {
  body .hero-card > img.hero-award-badge {
    top: 12px !important;
    right: calc(50% - (var(--rb-hero-stack-w, 448px) / 2) - 6px) !important;
    width: clamp(56px, 6.7vw, 66px) !important;
    min-width: 56px !important;
    margin: 0 !important;
    transform: none !important;
  }
}

/* v4: keep the badge pinned to the enlarged hero art on phones too. */
@media (max-width: 520px) {
  body .hero-card > img.hero-award-badge {
    top: 10px !important;
    right: calc(50% - (var(--rb-hero-stack-w, 327px) / 2) - 8px) !important;
    width: clamp(45px, 12.6vw, 52px) !important;
    min-width: 45px !important;
    margin: 0 !important;
    transform: none !important;
  }
}

/* v6: phone-only production fixes for the three remaining mobile layout gaps. */
@media (max-width: 640px) {
  .hero-info-control .hero-save-button {
    height: 34px !important;
    padding: 4px 10px 4px 5px !important;
    gap: 6px !important;
    overflow: hidden !important;
    border-color: rgba(18, 150, 223, .28) !important;
    background:
      linear-gradient(135deg, rgba(255, 251, 241, .78), rgba(255, 220, 151, .78)),
      url("assets/schedule-wavy-stripes.webp") center center / cover no-repeat !important;
    box-shadow:
      0 9px 18px rgba(5, 22, 39, .20),
      inset 0 1px 0 rgba(255,255,255,.76) !important;
  }

  .hero-info-control .hero-save-button .hero-save-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    color: transparent !important;
    background:
      rgba(255,248,232,.96)
      url("assets/you-coffee-cup-heart.webp?v=1") center center / 17px auto no-repeat !important;
    border: 1px solid rgba(18,150,223,.25) !important;
    box-shadow: 0 5px 10px rgba(5,22,39,.18), inset 0 1px 0 rgba(255,255,255,.82) !important;
  }

  .hero-info-control .hero-save-button .hero-save-icon svg {
    display: none !important;
  }

  .closest-route.closest-route-premium {
    position: relative !important;
    padding-top: 48px !important;
  }

  .closest-route .closest-schedule-chip {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    z-index: 12 !important;
    max-width: min(52vw, 188px) !important;
    min-height: 26px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: .70rem !important;
    line-height: 1 !important;
    transform: none !important;
    pointer-events: none !important;
  }

  .closest-route .closest-schedule-chip::before {
    width: 7px !important;
    height: 7px !important;
    box-shadow: 0 0 0 3px rgba(221,140,24,.12) !important;
  }

  .all-pins-leaflet-map .leaflet-marker-icon.rb-map-pin-combo-icon,
  .all-pins-leaflet-map .rb-map-pin-combo-icon {
    width: 46px !important;
    height: 64px !important;
    margin-left: -23px !important;
    margin-top: -55px !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform-origin: 23px 55px !important;
  }

  .all-pins-leaflet-map .rb-map-pin-combo-icon .rb-map-pin-wrap,
  .all-pins-leaflet-map .rb-map-pin-combo-icon .rb-map-pin-wrap img {
    width: 46px !important;
    height: 64px !important;
    max-width: none !important;
    transform: none !important;
    transform-origin: 23px 55px !important;
    object-fit: fill !important;
  }

  .all-pins-leaflet-map .rb-map-pin-combo-icon .rb-map-pin-number {
    left: 50% !important;
    top: 38px !important;
    width: 24px !important;
    height: 18px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.58), 0 0 5px rgba(5,22,39,.55) !important;
    transform: translate(-50%, -50%) !important;
  }
}

@media (max-width: 430px) {
  .closest-route.closest-route-premium {
    padding-top: 45px !important;
  }

  .closest-route .closest-schedule-chip {
    top: 9px !important;
    right: 9px !important;
    max-width: calc(100% - 18px) !important;
    min-height: 25px !important;
    padding: 0 9px !important;
    font-size: .66rem !important;
  }
}
