/* =========================================
   WST – Weekly Schedule Tabs + Next12
   Uses THEME FONT (no custom font forcing)
   ========================================= */

/* -------------------------
   Base container
   ------------------------- */
.wst-schedule{
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 16px;
}

/* Header */
.wst-header{
  text-align:center;
  margin-bottom:16px;
}

.wst-title{
  font-size: 36px;
  line-height:1.15;
  margin:0 0 8px;
  font-weight:800;
  color:#0b3a57;
}

.wst-subtitle{
  color:#5b6b76;
  font-size:15px;
}

/* -------------------------
   Tabs
   ------------------------- */
.wst-tabs{
  display:flex;
  gap:18px;
  justify-content:center;
  border-bottom:1px solid rgba(0,0,0,.08);
  padding:10px 0 0;
  margin:16px 0 12px;
  flex-wrap:wrap;
}

.wst-tab{
  background:transparent;
  border:0;
  cursor:pointer;
  padding:10px 6px;
  font-size:15px;
  color:#2a3b45;
  position:relative;
}

.wst-tab.is-active{
  color:#f29b2b;
  font-weight:700;
}

.wst-tab.is-active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:2px;
  background:#f29b2b;
}

.wst-panel{ display:none; }
.wst-panel.is-active{ display:block; }

/* -------------------------
   Weekly items
   ------------------------- */
.wst-item{
  display:grid;
  grid-template-columns: 150px 1fr;
  align-items:center;
  gap:14px;
  padding:26px 0 18px;
  border-bottom:2px solid #163a52;
  position:relative;
}

.wst-item__media{ position: relative; }

.wst-img{
  width: 180px;
  height: 102px;
  object-fit:cover;
  border-radius:8px;
  display:block;
}

.wst-img--empty{
  background: rgba(0,0,0,.06);
}

/* time label (smaller) */
.wst-time{
  position:absolute;
  left:0;
  top:6px;
  font-size:22px;
  font-weight:700;
  letter-spacing:.5px;
  color:#0b3a57;
}

/* program title (smaller) */
.wst-name{
  font-size:22px;
  font-weight:800;
  line-height:1.15;
  color:#0b3a57;
}

.wst-host{
  font-size:14px;
  color:#60707a;
  line-height:1.35;
}

.wst-hostline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 6px;
}

.wst-now-text{
  color:#e00000;
  font-weight:900;
  line-height:1.2;
  white-space:nowrap;
}

/* NOW PLAYING red bar (desktop) */
.wst-item__media.is-now::after{
  content:"";
  position:absolute;
  top:8px;
  bottom:8px;
  right:-12px;
  width:5px;
  background:#e00000;
  border-radius:6px;
}

.wst-empty{
  padding:16px 0;
  color:#60707a;
}

/* =========================================
   NEXT 12 HOURS (Carousel)
   ========================================= */
.wst-next12{
  background:#f2f2f2;
  padding:18px 14px;
  border-radius:14px;
}

/* Title right aligned */
.wst-next12__header{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin-bottom:12px;
}

.wst-next12__title{
  font-size:22px;
  font-weight:900;
  color:#111;
  text-align:right;
  width:100%;
}

/* Wrap as grid: row1 track, row2 arrows */
.wst-next12__wrap{
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  row-gap:14px;
}

/* Track row1 full width */
.wst-next12__track{
  grid-column: 1 / -1;
  grid-row: 1;

  display:flex;
  gap:16px;
  overflow-x:auto;
  scroll-behavior:smooth;
  padding:8px 4px;
  -webkit-overflow-scrolling:touch;
}

.wst-next12__track::-webkit-scrollbar{ height:8px; }
.wst-next12__track::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.15);
  border-radius:999px;
}

/* ✅ Smaller cards (desktop + mobile responsive) */
.wst-next12__card{
  min-width: 210px;
  max-width: 250px;
  background:#fff;
  border-radius:10px;
  padding:14px 14px 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  position:relative;
}

.wst-next12__time{
  font-size:18px;
  font-weight:900;
  color:#111;
  text-align:right;
  margin-bottom:8px;
}

.wst-next12__body{ text-align:right; }

.wst-next12__now{
  font-size:14px;
  font-weight:900;
  color:#e00000;
  margin-bottom:6px;
}

.wst-next12__name{
  font-size:20px;
  font-weight:900;
  color:#111;
  line-height:1.35;
}

.wst-next12__host{
  font-size:14px;
  color:#60707a;
  margin-top:6px;
}

.wst-next12__progress{
  margin-top:12px;
  height:8px;
  background: rgba(224,0,0,.14);
  border-radius:999px;
  overflow:hidden;
}

.wst-next12__progressFill{
  display:block;
  height:100%;
  width:0%;
  background:#e00000;
  border-radius:999px;
  transition: width .3s ease;
}

.wst-next12__card.is-now{
  box-shadow: 0 0 0 2px rgba(224,0,0,.18);
}

/* Arrows row2 */
.wst-next12__arrow{
  grid-row: 2;
  align-self:center;

  background:#d0d0d0;
  border-radius:999px;
  width:46px;
  height:46px;

  border:0;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:24px;
  line-height:1;
}

/* RTL placement: prev left, next right */
.wst-next12__arrow--prev{
  grid-column: 2;
  justify-self:end;
}
.wst-next12__arrow--next{
  grid-column: 1;
  justify-self:start;
}

.wst-next12__empty{
  padding:16px;
  color:#60707a;
}

/* ✅ فقط برای کارتِ در حال پخش نشان بده */
.wst-next12__now{ display:none; }
.wst-next12__progress{ display:none; }
.wst-next12__card.is-now .wst-next12__now{ display:block; }
.wst-next12__card.is-now .wst-next12__progress{ display:block; }

/* =========================================
   MOBILE
   ========================================= */
@media (max-width:768px){

  /* Weekly header smaller */
  .wst-title{ font-size:28px; }

  /* Weekly layout to single column */
  .wst-item{
    grid-template-columns:1fr;
    padding:18px 0 14px;
    gap:10px;
  }

  .wst-time{
    position:static;
    margin-bottom:6px;
    text-align:right;
    font-size:18px;
  }

  .wst-name{ font-size:20px; }
  .wst-host{ font-size:13px; }

  /* Hide images in WEEKLY schedule only (strong) */
  .wst-schedule .wst-item__media{
    display:none !important;
  }
  .wst-schedule img.wst-img,
  .wst-schedule .wst-img{
    display:none !important;
  }
  .wst-schedule .wst-item{
    grid-template-columns: 1fr !important;
  }

  /* Mobile: Weekly tabs as swipe carousel (no arrows) */
  .wst-tabs{
    justify-content:flex-start !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
    gap:12px;
    padding:10px 8px 0;
    margin:16px 0 12px;
    scroll-snap-type:x mandatory;
  }
  .wst-tabs::-webkit-scrollbar{ display:none; }
  .wst-tabs{ scrollbar-width:none; }

  .wst-tab{
    flex:0 0 auto;
    white-space:nowrap;
    scroll-snap-align:start;
    padding:10px 10px;
    font-size:14px;
  }

  /* Next12 even smaller on mobile */
  .wst-next12__title{ font-size:20px; }
  .wst-next12__card{
    min-width: 190px;
    max-width: 220px;
    padding:12px;
  }
  .wst-next12__name{ font-size:18px; }
  .wst-next12__time{ font-size:16px; }
  .wst-next12__host{ font-size:13px; }
  .wst-next12__arrow{
    width:42px;
    height:42px;
    font-size:22px;
  }
}

/* Very small mobile */
@media (max-width:480px){
  .wst-next12__card{
    min-width: 175px;
    max-width: 205px;
  }
}
/* ==============================
   MOBILE FIX: Next12 smaller
   - Grey area height ~ half
   - White cards smaller
   ============================== */
@media (max-width: 768px){

  /* طوسی (کانتینر) کوچیک‌تر */
  .wst-next12{
    padding: 10px 10px !important;     /* قبلاً زیاد بود */
    border-radius: 12px !important;
  }

  /* فاصله‌ها و گرید کمتر => ارتفاع طوسی کمتر */
  .wst-next12__wrap{
    row-gap: 8px !important;
    grid-template-rows: auto auto !important;
  }

  /* ترک: فاصله‌ی داخلی کمتر */
  .wst-next12__track{
    gap: 10px !important;
    padding: 6px 2px !important;
  }

  /* کارت سفید کوچیک‌تر */
  .wst-next12__card{
    min-width: 155px !important;
    max-width: 185px !important;
    padding: 10px 10px 9px !important;
    border-radius: 10px !important;
  }

  .wst-next12__time{
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }

  .wst-next12__name{
    font-size: 16px !important;
    line-height: 1.3 !important;
  }

  .wst-next12__host{
    font-size: 12px !important;
    margin-top: 5px !important;
  }

  /* نوار پیشرفت کوتاه‌تر */
  .wst-next12__progress{
    height: 6px !important;
    margin-top: 8px !important;
  }

  /* فلش‌ها کوچیک‌تر => ارتفاع طوسی نصف میشه */
  .wst-next12__arrow{
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }


  .wst-next12__header{ margin-bottom: 8px !important; }
  .wst-next12__title{ font-size: 18px !important; }
}

/* خیلی ریزها */
@media (max-width: 420px){
  .wst-next12__card{
    min-width: 145px !important;
    max-width: 170px !important;
  }
}
