/**
 * Bultix Canlı Ticaret — premium panel + anonim toast
 */
.bx-live {
  --bxl-navy: #1a2744;
  --bxl-orange: #e96631;
  --bxl-text: #0f172a;
  --bxl-muted: #64748b;
  --bxl-surface: #ffffff;
  --bxl-border: #e2e8f0;
  --bxl-radius: 12px;
  --bxl-max: 1320px;
  --bxl-gutter: 20px;
  box-sizing: border-box;
  width: calc(100% - (var(--bxl-gutter) * 2));
  max-width: var(--bxl-max);
  margin: clamp(20px, 3vw, 36px) auto 0;
  padding: 0;
}

.bx-live *,
.bx-live *::before,
.bx-live *::after {
  box-sizing: border-box;
}

.bx-live__inner {
  background:
    linear-gradient(135deg, rgba(233, 102, 49, 0.06) 0%, transparent 42%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--bxl-border);
  border-radius: var(--bxl-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  padding: clamp(16px, 2.4vw, 22px) clamp(16px, 2.6vw, 24px);
}

.bx-live__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.bx-live__pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: bx-live-pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes bx-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .bx-live__pulse { animation: none; }
  .bx-live-toast { transition: none !important; }
}

.bx-live__title {
  margin: 0;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bxl-navy);
}

.bx-live__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.bx-live__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bxl-surface);
  border: 1px solid var(--bxl-border);
  color: var(--bxl-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.bx-live__chip.is-live {
  border-color: rgba(233, 102, 49, 0.35);
  background: rgba(233, 102, 49, 0.06);
}

.bx-live__chip-ico {
  font-size: 14px;
  line-height: 1;
}

.bx-live__lead {
  margin: 12px 0 0;
  color: var(--bxl-muted);
  font-size: 13px;
  line-height: 1.45;
}

.bx-live__lead.is-hidden {
  display: none;
}

/* Toasts — sağ alt, mobilde güvenli alan */
.bx-live-toasts {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 9400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(320px, calc(100vw - 24px));
  pointer-events: none;
}

.bx-live-toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid var(--bxl-border);
  border-left: 3px solid var(--bxl-orange);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bx-live-toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.bx-live-toast__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bxl-navy);
}

.bx-live-toast__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.bx-live-toast__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.bx-live-toast__meta {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--bxl-muted);
}

@media (max-width: 767px) {
  .bx-live {
    width: calc(100% - 24px);
    margin-top: 18px;
  }

  .bx-live__chip {
    font-size: 12px;
    padding: 6px 10px;
  }

  .bx-live-toasts {
    bottom: max(72px, env(safe-area-inset-bottom));
    width: min(300px, calc(100vw - 20px));
  }
}

/* Canlı ziyaretçi rozeti — Wiyango tarzı, Bultix paleti */
.bx-live-counter {
  position: fixed;
  z-index: 45;
  right: 16px;
  bottom: 72px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: #1a2744;
  color: #fff;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bx-live-counter[hidden] {
  display: none !important;
}
.bx-live-counter__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: bx-live-pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
.bx-live-counter__now b,
.bx-live-counter__today b {
  font-weight: 800;
  color: #fb923c;
}
.bx-live-counter__sep {
  opacity: 0.45;
  font-weight: 500;
}
@media (max-width: 1024px) {
  .bx-live-counter {
    right: 12px;
    left: auto;
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 76px));
    font-size: 11px;
    padding: 7px 10px 7px 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bx-live-counter__dot { animation: none; }
}
