/*
 * Jontro Bazar – বিজ্ঞপ্তি + জনসচেতনতা Slider CSS
 * File: /wp-content/themes/YOUR-CHILD-THEME/jontrobazar/notice-slider.css
 * Scoped .jbsl-* · slim + narrower than the old banner
 *
 * All slides are stacked in one grid cell, so the box is exactly as tall
 * as the tallest slide — no fixed height to guess, no layout jump.
 */

.jbsl {
  --jbsl-max: 940px;
  position: relative;
  width: 100%;
  max-width: var(--jbsl-max);
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif;
  box-sizing: border-box;
}
.jbsl *, .jbsl *::before, .jbsl *::after { box-sizing: inherit; }

/* ═══════════════════════════════════════
   TRACK — every slide in the same grid cell
═══════════════════════════════════════ */
.jbsl__track { display: grid; }

.jbsl__slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px 24px;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.jbsl__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .5s ease;
}

/* soft glow on the right */
.jbsl__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 20%, var(--glow), transparent 42%);
  pointer-events: none;
}

/* ═══════════════════════════════════════
   THEMES
═══════════════════════════════════════ */
/* বিজ্ঞপ্তি — navy + orange (matches the old promo banner) */
.jbsl__slide[data-type="promo"] {
  --bg: linear-gradient(135deg, #1A1A2E 0%, #16213E 60%, #12325E 100%);
  --glow: rgba(242,101,34,.26);
  --accent: #FF8A3D;
  --accent-bg: rgba(242,101,34,.2);
}
/* জনসচেতনতা — deep green */
.jbsl__slide[data-type="aware"] {
  --bg: linear-gradient(135deg, #0F2A1E 0%, #0B3B2C 60%, #0A4A38 100%);
  --glow: rgba(74,222,128,.22);
  --accent: #4ADE80;
  --accent-bg: rgba(74,222,128,.18);
}

/* ═══════════════════════════════════════
   CONTENT
═══════════════════════════════════════ */
.jbsl__icon {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  line-height: 1;
}

.jbsl__body { position: relative; flex: 1; min-width: 0; }

.jbsl__tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 1px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.jbsl__title {
  font-size: clamp(15.5px, 1.9vw, 19px);
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
  margin: 0;
}

.jbsl__text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.75);
  margin: 2px 0 0;
}

.jbsl__btn {
  position: relative;
  flex-shrink: 0;
  background: #F26522;
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(242,101,34,.35);
  transition: background .2s ease, transform .15s ease;
}
.jbsl__btn:hover { background: #E05510; color: #fff; transform: translateY(-2px); }
.jbsl__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ═══════════════════════════════════════
   DOTS (bottom centre, bigger tap area)
═══════════════════════════════════════ */
.jbsl__dots {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  display: flex;
  z-index: 3;
}
.jbsl__dot {
  position: relative;
  width: 20px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.jbsl__dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  transform: translate(-50%, -50%);
  transition: width .25s ease, background .25s ease;
}
.jbsl__dot.is-active::before { width: 18px; background: #fff; }
.jbsl__dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 6px; }

/* ═══════════════════════════════════════
   MOBILE
═══════════════════════════════════════ */
@media (max-width: 640px) {
  .jbsl { border-radius: 14px; }
  .jbsl__slide {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 13px 16px 24px;
  }
  .jbsl__icon { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
  .jbsl__body { flex: 1 1 0; }
  .jbsl__text { font-size: 12.5px; }
  .jbsl__btn  { flex: 1 1 100%; text-align: center; padding: 9px 16px; font-size: 13px; }
}

/* ═══════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .jbsl__slide, .jbsl__slide.is-active { transition: none; }
  .jbsl__btn, .jbsl__dot::before { transition: none; }
}
