/*
Theme Name: Haiti Broadcasting App
Version: 1.0
*/
:root{
  --bg:#05070d;
  --card: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.10);
  --text:#fff;
  --muted: rgba(255,255,255,.75);
  --hb-blue:#123b8a;
  --hb-red:#e8002a;
}
body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,Arial}
body{ -webkit-text-size-adjust:100%; }
a{color:inherit}
button,a,input,select,textarea{font:inherit}

/* Better mobile tap feel */
a,button,[role="button"],.aw-nav-item,.aw-auth-link,.awobaz-share-btn,.awobaz-sticky-btn{touch-action:manipulation}
*{ -webkit-tap-highlight-color: rgba(0,0,0,0); }

.aw-app-header{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  position:sticky;top:0;z-index:999;
  background:rgba(5,7,13,.78);
  backdrop-filter:blur(12px);
}
.aw-container{max-width:1320px;margin:0 auto;padding:0 14px}
.aw-brand{display:flex;align-items:center;justify-content:space-between;gap:12px}

.aw-brand-logo{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.aw-brand-logo img{height:44px;width:auto;display:block}
.aw-brand-logo .custom-logo{height:44px;width:auto}
.aw-brand-logo .custom-logo-link{display:inline-flex;align-items:center}

.aw-header-actions{display:flex;align-items:center;gap:10px}
.aw-live-pill{
  display:inline-flex;align-items:center;gap:10px;
  padding:8px 12px;border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  font-weight:1000;letter-spacing:.3px;
}
.aw-live-dot{width:10px;height:10px;border-radius:999px;background:var(--hb-red);box-shadow:0 0 0 4px rgba(232,0,42,.18)}

.aw-main{padding:8px 0 84px}

/* bottom nav */
.aw-bottom-nav{
  position:fixed;left:0;right:0;bottom:0;
  background:rgba(5,7,13,.85);
  border-top:1px solid rgba(255,255,255,.10);
  backdrop-filter:blur(12px);
  padding:10px 10px;
}
.aw-bottom-nav .aw-container{display:flex;justify-content:space-between;gap:10px}
.aw-nav-item{flex:1;text-decoration:none;text-align:center;padding:10px 8px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);font-weight:900}
.aw-nav-item:hover{background:rgba(255,255,255,.10)}

/* ---------- Header AJAX Search ---------- */
.aw-header-actions{display:flex;align-items:center;gap:12px}
.aw-search{position:relative;max-width:360px;width:clamp(180px, 34vw, 360px)}
.aw-search-input{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:inherit;
  outline:none;
}
.aw-search-input::placeholder{opacity:.75}
.aw-search-box{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  background:rgba(15,15,15,.98);
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  overflow:hidden;
  display:none;
  z-index:999;
}
.aw-search-box.is-open{display:block}
.aw-search-list{max-height:360px;overflow:auto}
.aw-search-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  text-decoration:none;
  color:inherit;
}
.aw-search-item:hover{background:rgba(255,255,255,.06)}
.aw-search-thumb{width:58px;height:34px;border-radius:10px;overflow:hidden;background:rgba(255,255,255,.08);flex:0 0 auto}
.aw-search-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.aw-search-ph{width:100%;height:100%}
.aw-search-title{font-weight:800;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.aw-search-empty{padding:12px;opacity:.8}

/* ---------- Category Page Head ---------- */
.aw-tax-head{margin:18px 0 10px}
.aw-tax-title{margin:0 0 8px;font-size:28px;font-weight:1000;letter-spacing:-0.02em}
.aw-tax-desc{opacity:.85;max-width:900px}

@media (max-width:720px){
  .aw-search{max-width:100%;width:100%}
  .aw-header-actions{width:100%;justify-content:flex-end}
}

/* Share bar */
.awobaz-share{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 14px}
.awobaz-share-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06);color:inherit;text-decoration:none;font-weight:800;font-size:13px;cursor:pointer}
.awobaz-share-btn:hover{background:rgba(255,255,255,.12)}
.awobaz-copy-msg{margin-left:6px;opacity:.85;font-weight:800;font-size:12px}

/* Categories page – Netflix rows */
.awobaz-row-section{margin:18px 0 22px}
.awobaz-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
.awobaz-row-title{font-weight:1000;font-size:18px;letter-spacing:.2px;color:rgba(255,255,255,.96);text-decoration:none}
.awobaz-row-title:hover{text-decoration:underline}
.awobaz-row-actions{display:flex;gap:8px;align-items:center}
.awobaz-row-btn{
  width:38px;height:34px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  font-weight:1000;font-size:18px;
  cursor:pointer;
}
.awobaz-row-btn:hover{background:rgba(255,255,255,.10)}
.awobaz-row{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding-bottom:6px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
}
.awobaz-row::-webkit-scrollbar{height:10px}
.awobaz-row::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:999px}
.awobaz-card--row{flex:0 0 auto;width:240px;scroll-snap-align:start}
@media(max-width:700px){.awobaz-card--row{width:210px}}
@media(max-width:430px){.awobaz-card--row{width:82vw}}



/* --- Share UI upgrades --- */
.awobaz-share-bottom{ margin-top:32px; padding-top:18px; border-top:1px solid rgba(255,255,255,.10); display:flex; gap:10px; flex-wrap:wrap; justify-content:center; align-items:center; }
.awobaz-share-label{ width:100%; text-align:center; font-weight:800; opacity:.9; margin-bottom:6px; }
.awobaz-share-btn{ background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.14); color:#fff; padding:10px 14px; border-radius:999px; font-weight:800; text-decoration:none; cursor:pointer; }
.awobaz-share-btn:hover{ background:rgba(255,255,255,.16); }
.awobaz-copy-msg{ margin-left:8px; opacity:.9; font-weight:800; }

/* Sticky mobile share bar */
.awobaz-share-sticky{ position:fixed; left:0; right:0;
  /* sit above the fixed bottom nav */
  bottom: calc(66px + env(safe-area-inset-bottom));
  z-index:9999; display:none; gap:10px; justify-content:center;
  padding:10px 10px;
  background:rgba(0,0,0,.82); border-top:1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px);
}
.awobaz-sticky-btn{ background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); color:#fff; padding:10px 14px; border-radius:999px; font-weight:900; }
@media (max-width: 820px){
  .awobaz-share-sticky{ display:flex; }
  /* room for sticky share + bottom nav */
  body.single-tv_channel{ padding-bottom:140px; }
}

/* Share icon on grid cards */
.awobaz-thumb{ position:relative; }
.awobaz-card-share{
  position:absolute;
  top:10px; right:10px;
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.awobaz-card-share:hover{ background:rgba(0,0,0,.72); }

/* QR modal */
.awobaz-modal{ position:fixed; inset:0; z-index:10000; display:none; }
.awobaz-modal.is-open{ display:block; }
.awobaz-modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.72); }
.awobaz-modal-panel{
  position:relative;
  max-width:420px;
  margin:12vh auto 0;
  background:rgba(15,15,18,.98);
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  padding:18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.5);
}
.awobaz-modal-close{ position:absolute; top:10px; right:12px; background:transparent; border:0; color:#fff; font-size:28px; line-height:1; cursor:pointer; }
.awobaz-modal-title{ font-weight:1000; margin-bottom:12px; text-align:center; }
.awobaz-qr-wrap{ display:flex; justify-content:center; padding:8px 0 14px; }
.awobaz-qr-img{ width:220px; height:220px; border-radius:12px; background:#fff; }
.awobaz-modal-actions{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }

/* Toast */
.awobaz-toast{
  position:fixed; top:16px; left:50%;
  transform:translateX(-50%);
  background:rgba(0,0,0,.82);
  border:1px solid rgba(255,255,255,.18);
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
  z-index:11000;
}
.awobaz-toast.is-show{ opacity:1; }

/* =============================
   Mobile responsiveness upgrades
   ============================= */
*,*::before,*::after{box-sizing:border-box}
img,video,iframe{max-width:100%;height:auto}
.aw-container{width:100%}

/* Make header wrap nicely on mobile */
@media (max-width: 820px){
  .aw-brand{flex-wrap:wrap;justify-content:flex-start}
  .aw-header-actions{flex:1 1 100%;justify-content:space-between;gap:10px}
  .aw-live-pill{flex:0 0 auto}
  .aw-search{flex:1 1 auto;width:100%;max-width:none}
}

@media (max-width: 520px){
  .aw-app-header{padding:10px 10px}
  .aw-container{padding:0 10px}
  .aw-brand-logo img,.aw-brand-logo .custom-logo{height:38px}
  .aw-live-pill{padding:7px 10px;font-size:12px}
  .aw-search-input{padding:10px 12px}
}

/* Bottom nav: allow safer tap targets */
@media (max-width: 520px){
  .aw-bottom-nav{padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  .aw-nav-item{padding:10px 6px;border-radius:14px;font-size:13px}
}

/* Share modal on small screens */
@media (max-width: 520px){
  .awobaz-modal-panel{margin:10vh 10px 0;max-width:none}
  .awobaz-qr-img{width:200px;height:200px}
}

/* Auth link in header */
.aw-auth-link{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 12px;border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  text-decoration:none;
  font-weight:1000;
}
.aw-auth-link:hover{background:rgba(255,255,255,.10)}
@media (max-width:520px){
  .aw-auth-link{padding:9px 10px;font-size:13px}
}
