/* ==========================================================================
   GenZ Talks - Customizable Breaking News Ticker Frontend CSS
   ========================================================================== */

:root {
  --cbnt-speed: 45s;
  --cbnt-badge-bg: #e60000;
  --cbnt-badge-gradient: #b80000;
  --cbnt-badge-color: #ffffff;
  --cbnt-bg: #f8fafc;
  --cbnt-border: #e2e8f0;
  --cbnt-text: #1e293b;
  --cbnt-hover: #e60000;
  --cbnt-sep: #e60000;
  --cbnt-font-size: 13.5px;
  --cbnt-font-weight: 700;
}

.genz-cbnt-container {
  width: 100%;
  margin: 4px 0 16px 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Telugu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.genz-cbnt-inner {
  display: flex;
  align-items: center;
  background: var(--cbnt-bg);
  border: 1px solid var(--cbnt-border);
  border-radius: 6px;
  height: 40px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: all 0.2s ease;
}

/* Badge Styling */
.genz-cbnt-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--cbnt-badge-bg) 0%, var(--cbnt-badge-gradient) 100%);
  color: var(--cbnt-badge-color);
  padding: 0 18px 0 14px;
  height: 100%;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.12);
  user-select: none;
}

/* Badge Shapes */
.genz-cbnt-badge.shape-arrow {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.genz-cbnt-badge.shape-rounded {
  border-radius: 4px 0 0 4px;
  padding: 0 14px;
}

.genz-cbnt-badge.shape-pill {
  border-radius: 20px;
  margin: 4px 6px;
  height: calc(100% - 8px);
  padding: 0 14px;
}

/* Pulse Dot */
.genz-cbnt-pulse {
  width: 7px;
  height: 7px;
  background-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: genzCbntPulse 1.2s infinite ease-in-out;
}

@keyframes genzCbntPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.65); }
}

.genz-cbnt-label {
  white-space: nowrap;
}

/* Scrolling Track Wrapper with soft edge fades */
.genz-cbnt-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
}

/* Scrolling Track */
.genz-cbnt-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: genzCbntMarquee var(--cbnt-speed) linear infinite;
}

.genz-cbnt-track.direction-right {
  animation-direction: reverse;
}

/* Pause on hover */
.genz-cbnt-inner.pause-on-hover:hover .genz-cbnt-track {
  animation-play-state: paused;
}

@keyframes genzCbntMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Items */
.genz-cbnt-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-right: 24px;
  flex-shrink: 0;
}

.genz-cbnt-sep {
  color: var(--cbnt-sep);
  font-size: 10px;
  line-height: 1;
  opacity: 0.9;
  user-select: none;
}

.genz-cbnt-link {
  color: var(--cbnt-text);
  text-decoration: none;
  font-size: var(--cbnt-font-size);
  font-weight: var(--cbnt-font-weight);
  transition: color 0.15s ease, text-decoration 0.15s ease;
  white-space: nowrap;
  line-height: 1.3;
}

.genz-cbnt-link:hover {
  color: var(--cbnt-hover);
  text-decoration: underline;
}

/* Custom urgent flash news tag if marked urgent */
.genz-cbnt-urgent {
  background: #ff0033;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-block;
}

/* Dark Mode Support */
body.dark-mode .genz-cbnt-inner {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .genz-cbnt-link {
  color: #f1f5f9;
}

body.dark-mode .genz-cbnt-link:hover {
  color: #ff4d4d;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .genz-cbnt-inner {
    height: 36px;
  }
  .genz-cbnt-badge {
    padding: 0 12px 0 10px;
    font-size: 10px;
  }
  .genz-cbnt-badge.shape-arrow {
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
  }
  .genz-cbnt-link {
    font-size: 12.5px;
  }
  .genz-cbnt-item {
    padding-right: 18px;
    gap: 8px;
  }
}
