/* ==========================================================================
   ZET Traffic News & Disruptions UI (Nenametljivo, moderno i vidljivo)
   ========================================================================== */

/* --- 1. Notification Bell u Navigaciji --- */
.nav-news-bell-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  user-select: none;
  outline: none;
}

.nav-news-bell-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  transform: translateY(-1px);
}

.nav-news-bell-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.25s ease;
}

.nav-news-bell-btn:hover .nav-news-bell-icon {
  transform: rotate(15deg);
}

.nav-news-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f59e0b;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.nav-news-badge.has-unread {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  animation: pulse-amber-glow 2.5s infinite;
}

@keyframes pulse-amber-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 14px rgba(245, 158, 11, 0.85); }
}

/* --- 2. Ticker Info Traka (Ispod navigacije / vrh karte) --- */
.traffic-news-ticker-wrap {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
}

.traffic-news-ticker-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.ticker-left-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.ticker-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.ticker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse-dot-anim 1.5s infinite;
}

@keyframes pulse-dot-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.ticker-headline-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  cursor: pointer;
}

.ticker-headline-text {
  color: #f1f5f9;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.ticker-headline-box:hover .ticker-headline-text {
  color: #fbbf24;
  text-decoration: underline;
}

.ticker-lines-chips {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.ticker-line-chip {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.ticker-line-chip.bus {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.ticker-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ticker-btn-details {
  background: transparent;
  border: none;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ticker-btn-details:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
}

.ticker-nav-btns {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ticker-arrow-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.ticker-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ticker-btn-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.15s;
}

.ticker-btn-dismiss:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* --- 3. Traffic News Modal / Drawer --- */
.traffic-news-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 13, 24, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.traffic-news-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.traffic-news-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(245, 158, 11, 0.15);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.traffic-news-modal-backdrop.open .traffic-news-modal-card {
  transform: translateY(0) scale(1);
}

.news-modal-header {
  padding: 1.25rem 1.5rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.news-modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-modal-icon-badge {
  font-size: 1.5rem;
  line-height: 1;
}

.news-modal-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.news-modal-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.news-modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.15s;
}

.news-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.news-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Pojedinačna kartica vijesti u modalu */
.news-item-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.2rem;
  transition: border-color 0.15s, background 0.15s;
}

.news-item-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(30, 41, 59, 0.7);
}

.news-item-card.has-target-line {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.08);
}

.news-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.news-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin: 0;
}

.news-item-date {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 7px;
  border-radius: 5px;
}

.news-item-lines-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0.75rem;
}

.news-lines-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.news-line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.news-line-badge.tram {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.news-line-badge.bus {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.news-line-badge.night {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
}

.news-item-body {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.news-item-body strong {
  color: #fff;
}

.news-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-zet-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.news-zet-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.news-modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
}

.news-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- 4. Kontekstualni alert na karti (Vehicle detail & Lines list) --- */
.line-traffic-disruption-alert {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #fde68a;
  line-height: 1.4;
}

.line-traffic-disruption-alert .alert-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.line-traffic-disruption-alert .alert-content {
  flex: 1;
}

.line-traffic-disruption-alert .alert-link {
  display: inline-block;
  margin-top: 4px;
  color: #fbbf24;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* --- 5. Responzivnost --- */
@media (max-width: 768px) {
  .traffic-news-ticker-inner {
    padding: 7px 10px;
    gap: 8px;
  }
  .ticker-alert-pill {
    padding: 2px 6px;
    font-size: 0.68rem;
  }
  .ticker-headline-text {
    font-size: 0.82rem;
  }
  .ticker-lines-chips {
    display: none; /* Uštedi prostor na uskim mobilnim ekranima */
  }
  .ticker-nav-btns {
    display: none;
  }
  .traffic-news-modal-card {
    max-height: 92vh;
    border-radius: 14px;
  }
  .news-modal-header {
    padding: 1rem 1.15rem;
  }
  .news-modal-body {
    padding: 1rem 1.15rem;
  }
}
