/* /public_html/traffic/traffic.css
   APR Traffic — Galaxy Glass layout + cameras + modal
   (Includes main sub-nav styling + removes any old debug indicators)
*/

:root{
  --bg: #070914;
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted2: rgba(255,255,255,.55);

  --glass: rgba(20, 26, 44, .42);
  --glass2: rgba(20, 26, 44, .30);
  --stroke: rgba(255,255,255,.14);

  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 12px;

  --gap: 16px;
  --maxw: 1200px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body.apr-traffic-page{
  margin:0;
  color: var(--text);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;

  /* galaxy-ish background */
  background:
    radial-gradient(1100px 700px at 10% 18%, rgba(163, 66, 255, .28), transparent 62%),
    radial-gradient(1000px 700px at 86% 22%, rgba(0, 219, 255, .22), transparent 60%),
    radial-gradient(900px 650px at 55% 92%, rgba(255, 88, 203, .18), transparent 65%),
    linear-gradient(180deg, #030411, #060821 45%, #02030d);
}

/* -------------------------------------------------------
   HARD KILL SWITCHES for any old “traffic.css loaded” debug
   (If you still have an old badge div or pseudo-content)
-------------------------------------------------------- */
body.apr-traffic-page::before,
body.apr-traffic-page::after{
  content: none !important;
  display: none !important;
}
.apr-css-badge,
.css-badge,
.debug-badge,
#cssLoadedBadge,
[data-css-badge]{
  display:none !important;
}
/* If you accidentally still have a fixed badge div in HTML, hide ALL fixed bottom-right badges */
body.apr-traffic-page > div[style*="position:fixed"][style*="right:12px"][style*="bottom:12px"]{
  display:none !important;
}

/* links */
a{ color: inherit; }

/* -------------------------------------------------------
   TOP BAR (your traffic header)
-------------------------------------------------------- */
.apr-topbar{
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(10,12,24,.35);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.apr-topbar-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.apr-brand{
  display:flex;
  gap: 12px;
  align-items:center;
  min-width: 0;
}

.apr-logo{
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.apr-title{
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .2px;
}
.apr-subtitle{
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* TOP RIGHT NAV: Home/Admin only */
.apr-nav{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.apr-pill{
  text-decoration:none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  font-weight: 900;
  font-size: 13px;
}
.apr-pill:hover{
  border-color: rgba(255,255,255,.24);
}

/* -------------------------------------------------------
   SUB NAV BAR (matches your News/Weather look)
-------------------------------------------------------- */
.mainbar{
  max-width: var(--maxw);
  margin: 0 auto;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px 10px;
}

.pill{
  text-decoration:none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  font-weight: 900;
  font-size: 13px;
  color: var(--text);
}
.pill:hover{
  border-color: rgba(255,255,255,.24);
}
.pill.active{
  border-color: rgba(0,255,255,.35);
  box-shadow: 0 0 0 2px rgba(0,255,255,.10) inset;
}

/* -------------------------------------------------------
   PAGE WRAP + CARDS
-------------------------------------------------------- */
.apr-wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 14px 70px;
}

.apr-card{
  background: linear-gradient(180deg, var(--glass), var(--glass2));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px;
  margin: 0 0 16px;
}

.apr-card-head{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.apr-h2{
  margin:0;
  font-size: 18px;
  font-weight: 900;
}

.apr-note{
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.apr-footnote{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  color: var(--muted);
  font-size: 13px;
}

/* -------------------------------------------------------
   MAP
-------------------------------------------------------- */
.map-wrap{
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}

.map-iframe{
  width:100%;
  height: 520px;
  border:0;
  display:block;
}

/* -------------------------------------------------------
   CAM GRID
-------------------------------------------------------- */
.cam-grid{
  display:grid;
  gap: 14px;
}

.cam-spot{
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  overflow:hidden;
}

.cam-spot-head{
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.cam-spot-title{
  font-weight: 900;
  font-size: 15px;
}

.cam-two{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
}

.cam-box{ min-width:0; }

.cam-label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}

/* button-as-card */
.cam-btn{
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow:hidden;
  cursor:pointer;
  text-align:left;
  position: relative;
}

.cam-btn:hover{
  border-color: rgba(255,255,255,.22);
}

.cam-img{
  width: 100%;
  height: 220px;
  display:block;
  object-fit: cover;
  background: rgba(255,255,255,.04);
}

/* LIVE badge */
.cam-live{
  position:absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing:.4px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,255,.26);
  background: rgba(0,255,255,.10);
}

/* broken */
.cam-broken{
  position:absolute;
  bottom: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,80,80,.25);
  background: rgba(255,80,80,.12);
  display:none;
}

.cam-btn.is-broken .cam-broken{ display:inline-flex; }
.cam-btn.is-broken .cam-live{ display:none; }

/* -------------------------------------------------------
   MODAL
-------------------------------------------------------- */
body.cam-modal-open{
  overflow:hidden;
}

.cam-modal{
  position: fixed;
  inset: 0;
  z-index: 120;
  display:none;
}

.cam-modal.is-open{ display:block; }

.cam-modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
}

.cam-modal-panel{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(980px, calc(100vw - 24px));
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, var(--glass), rgba(10,12,24,.75));
  box-shadow: 0 18px 70px rgba(0,0,0,.65);
  overflow:hidden;
}

.cam-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.cam-modal-title{
  font-weight: 900;
  font-size: 14px;
}

.cam-modal-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cam-modal-btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  cursor:pointer;
}

.cam-modal-body{
  padding: 12px;
}

.cam-modal-stage{
  border-radius: var(--radius-lg);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  position: relative;
}

.cam-modal-img{
  width:100%;
  height: min(70vh, 620px);
  object-fit: contain;
  display:block;
  background: rgba(0,0,0,.25);
}

.cam-modal-msg{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  font-weight: 900;
  letter-spacing:.2px;
}

/* -------------------------------------------------------
   RESPONSIVE
-------------------------------------------------------- */
@media (min-width: 860px){
  .cam-two{
    grid-template-columns: 1fr 1fr;
  }
  .cam-img{
    height: 240px;
  }
}

@media (max-width: 520px){
  .map-iframe{ height: 440px; }
}
