/* ==========================================================
   GLOBAL — Layout Stability + Baseline Styles
   ========================================================== */

html {
  scroll-behavior: smooth;
}

   .live-dot {
     animation: pulse 1.2s ease-out 1;
    }

body {
  margin: 0;
  font-family: system-ui, Inter, sans-serif;
  background: black;
  color: #fff;
  text-align: center;

  /* Prevent reflow during font load */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

  .site-nav {
    padding: 12px 16px;
    border-bottom: 1px solid #222;
    background: #0b0b0b;
  }
  .site-nav a {
    color: #9ecbff;
    margin-right: 14px;
    font-size: 0.9rem;
    text-decoration: none;
  }


/* Make ALL text & links WCAG-passing contrast */
a {
  color: #ffffff !important;
}
a:hover {
  color: #ffeb3b !important; /* Accessible yellow hover */
}

main {
  padding: 1rem 1rem 90px;
  overflow-anchor: none; /* prevents scroll jumps */
}


/* ==========================================================
   HEADER + INTRO
   ========================================================== */

header {
  padding: 0.8rem 0 0.3rem;
  font-size: 1.8rem;
  font-weight: 600;
  background: #0d0d0d;
  margin: 0 !important;
  line-height: 1.2;
  min-height: 48px; /* prevents CLS on font rendering */
}

.page-intro {
  max-width: 760px;
  margin: 0.5rem auto 0.4rem !important;
  padding: 0 1rem;
  opacity: 0.88;
  line-height: 1.6;
  overflow-anchor: none;
}


#honkWrapr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.honkRow {
  position: relative;
  width: 100%;
  /* max-width: 360px; */

  display: flex;
  justify-content: left; /* TRUE center */
  align-items: center;
}

/* Honk stays pure center */
#honkBtn {
  font-size: 26px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  background: black;
  color: #111;
  font-weight: 600;
  cursor: pointer;
}

/* Share is removed from layout flow */
.share-wrapper {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
}

#nativeShareBtn {
  width: 26px;
  height: 26px;
  cursor: pointer;
}

.share-tooltip {
  position: absolute;
  bottom: 130%;
  right: 0;                 /* 🔑 pin to right */
  
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;

  font-size: 12px;
  line-height: 1.3;
  text-align: center;

  min-width: 120px;
  max-width: 200px;

  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.route-button-wrapper {
   padding: 9px;
   border-radius: 99px;
   background: #151515;
   color: white;
   margin-right: 13px;
   cursor: pointer;
}

.share-tooltip.show {
  opacity: 1;
}

/*
#nativeShareBtn {
  position: static;
     
  width: 26px;
  height: 26px;
  cursor: pointer;
} 
*/


/* Pressed state */
#honkBtn:active {
  transform: scale(0.94);
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
}

#honkCount {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.85;
}

#honkNote {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.6;
}


/* ==========================================================
   VIDEO CARD (CLS-proof YouTube Preview)
   ========================================================== */

#yt-container {
  position: relative;
  max-width: 960px;
 /* margin: 0.6rem auto 1.4rem; 
  aspect-ratio: 16/9; */
  background: #000 !important;
  border-radius: 16px;
  overflow: hidden !important;
}

/* Prevent aspect-ratio collapse on slow devices */
#yt-container::before {
  content: "";
  display: block;
  padding-bottom: calc(100% / (16/9));
  height: 0;
} 

/* #yt-container > * {
  position: absolute;
  inset: 0;
} */

#yt-container img,
#yt-container iframe,
#yt-overlay {
  position: absolute;
  inset: 0;
}

img{
  max-width: 100vw;
  height: 100%;
  display: block;
  object-fit: contain;  /* no crop, may show black bars */
  background: black;
  margin-left: auto;
  margin-right: auto;
}

#yt-overlay {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#yt-overlay span {
  font-size: 1.25rem;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.65rem 1.6rem;
  border-radius: 12px;
  backdrop-filter: blur(3px);
}

#yt-container iframe {
  position: absolute;
  inset: 0;
  width: 101%;
  height: 101%;
  top: -0.5%;
  left: -0.5%;
  border: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ==========================================================
   NOTIFY BUTTON + NOTIFY HELP (CLS SAFE)
   ========================================================== */

.notify-wrap {
  opacity: 0.85;
  text-align: left;
}

.notify-btn {
   width: fit-content !important;
   padding: 8px;
   background: transparent;
   border: none;
   font-size: 10px;
   /* font-weight: 600; */
   cursor: pointer;
   /* text-decoration: underline; */
   text-underline-offset: 4px;
   color: #555;
   border: none;
   border-radius: 100px;
   border-color: white;
   color: whitesmoke;
   border-width: 1.1px;
}

.notify-btn:hover {
  color: #555;
}

.notify-desc {
  margin-top: 4px;
  font-size: 13px;
  color: #666;
}

#notifyHelp {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}


/* ==========================================================
   SHARE ICONS
   ========================================================== */

#share-icons {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

#share-icons img {
  width: 38px;
  height: 38px;
  cursor: pointer;
  flex-shrink: 0;
}


/* ==========================================================
   INSTALL BUTTON
   ========================================================== */

.primary-btn {
  margin-top: 1.2rem;
  background: #1d87ff;
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Rain layer */
.rain-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    linear-gradient(
      120deg,
      rgba(255,255,255,0.15) 0%,
      rgba(255,255,255,0.05) 40%,
      rgba(255,255,255,0) 60%
    );
  background-size: 200% 200%;
  animation: drizzle 6s linear infinite;
  z-index: 2;
}

/* Only active when rainy */
.image-wrapper.rainy .rain-overlay {
  opacity: 0.18; /* 🔑 very subtle */
}

@keyframes drizzle {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

.share-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
     z-index: 10;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.share-btn:active {
  transform: scale(0.95);
}



/* ==========================================================
   CONTENT CARDS
   ========================================================== */

.section-card {
  background: #111;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 0 12px rgba(0,0,0,0.15);
  margin: 1.6rem auto;
  max-width: 900px;
  text-align: left;
  line-height: 1.6;
  font-size: 1rem;
  overflow-anchor: none;
}

.section-card h2,
.section-card h3 {
  color: rgba(255,255,255,0.92);
  margin: 0 0 0.8rem;
  font-weight: 600;
  min-height: 28px;
}

.section-card ul {
  margin: 0.4rem 0 0 1.2rem;
  padding: 0;
}

.section-card li {
  margin: 0.4rem 0;
}


/* ==========================================================
   FOOTER (Fully WCAG Contrast Compliant)
   ========================================================== */

footer {
  opacity: 0.9;
  font-size: 0.9rem;
  padding: 2rem 0 1rem;
  background: #0d0d0d;
  border-top: 1px solid rgba(255,255,255,0.08);
}

footer,
footer a,
footer span,
footer p {
  color: #ffffff !important; /* FIX: Makes contrast pass */
}


/* ==========================================================
   BOTTOM AD — NO CLS
   ========================================================== */

#bottomAdContainer {
  width: 100%;
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  overflow: hidden;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
}

#bottomAdContainer[style*="display:none"] {
  visibility: hidden !important;
}

/* ======
   AMAZON DEALS
========== */

#amazonDealsFloating {
  position: fixed !important;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 520px;
   /* amazon regular #232F3E 
      amazon now white*/
  background: #232F3E;
  padding: 12px 16px;
  border-radius: 18px;
  margin-left: 13px;
  margin-right: 13px;
 
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  font-family: Inter, system-ui, sans-serif;

  z-index: 999999999;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}


#amazonDealsFloating a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff !important;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

#amazonDealsFloating:active {
  transform: translateX(-50%) scale(0.98);
  opacity: 0.95;
}

#amazonDealsFloating img {
  height: 15px;
  opacity: 0.9;
}

@keyframes amazonPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

#amazonDealText {
  animation: amazonPulse 5s ease-in-out infinite;
  color: black;
     /* amazon regular - not pplicable do not add 
      amazon now black*/

}

#amazonDealsFloating:hover #amazonDealText,
#amazonDealsFloating:active #amazonDealText {
  animation-play-state: paused;
}

/* Add space so content doesn’t hide behind banner */
body {
  padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
}

.time_time {
   margin-left: 41px;
}
/* ==========================================================
   AMAZON DEALS BUtton
   ========================================================== */
/* #amazon-overlay {
   position: absolute;
   bottom: 131px;
   right: 159px;
   z-index: 4;
   width: 150;
   background: black;
   cursor: pointer;
   opacity: 0.7;
   transition: opacity 0.2s ease;
   backdrop-filter: blur(2px);
} */

#amazon-overlay {
  position: absolute;
  bottom: 35px;
  left: 10px;
  z-index: 4;

  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;

  padding: 6px 8px;
  cursor: pointer;

  opacity: 0.7;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}


#amazon-overlay .amazon-btn {
  display: flex;
  align-items: center;     /* 🔑 prevents overlap */
  gap: 6px;
}

#amazon-overlay img {
  height: clamp(31px, 2.5vw, 16px);
  width: auto;
  display: block;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px !important;
  padding: 6px 10px;
}

#amazon-overlay:hover {
  opacity: 0.95;
}

#amazon-overlay span {
  font-size: clamp(0.65rem, 1.8vw, 0.75rem);
  line-height: 1;
  white-space: nowrap;
}

.route-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  z-index: 999;
}

/* smart routr sheet */
.route-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: #0f0f0f;
  color: #fff;
  border-radius: 18px 18px 0 0;
  padding: 14px 16px 24px;
  z-index: 1000;
  transition: bottom 0.32s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.route-handle {
  width: 42px;
  height: 4px;
  background: #444;
  border-radius: 2px;
  margin: 0 auto 10px;
}

.route-sheet h3 {
  margin: 0;
  font-size: 18px;
}

.route-sub {
  font-size: 13px;
  opacity: 0.75;
  margin: 4px 0 12px;
}

.route-card {
  display: block;
  text-decoration: none;
  color: #fff;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.route-title {
  font-weight: 600;
  font-size: 15px;
}

.route-desc {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}

.good    { border-left: 4px solid #2ecc71; }
.warn    { border-left: 4px solid #f1c40f; }
.danger  { border-left: 4px solid #e74c3c; }
.neutral { border-left: 4px solid #3498db; }

.route-footer {
  display: block;
  text-align: center;
  font-size: 11px;
  opacity: 0.6;
  margin-top: 6px;
}

/* image src animatio */
  #trafficImage {
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  /* Applied briefly when image updates */
  .img-refresh {
    opacity: 0.85;
    transform: scale(1.01);
  }

.auto-fit {
  white-space: nowrap;
  overflow: hidden;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 600px) {

  header {
    font-size: 1.6rem;
    padding: 0.7rem 0 0.3rem;
    min-height: 44px;
  }

  #yt-container {
    margin-top: 0.4rem !important;
  }

  #yt-overlay span {
    font-size: 1.1rem;
    padding: 0.55rem 1.3rem;
  }

  .notify-btn {
    width: 100%;
    font-size: 0.95rem;
  }
}

