/* ==========================================
   NEWS TICKER
========================================== */

.news-ticker {
  position: fixed;
  top: 88px;
  left: 0;
  width: 100%;
  overflow: hidden;
  background: #c62828;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  z-index: 9998;
}

.news-ticker__inner {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
}

.news-ticker__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 100%;
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.16);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-ticker__badge i {
  font-size: 16px;
}

.news-ticker__viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.news-ticker__track {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  width: max-content;
  padding-left: 24px;
  padding-right: 24px;
  white-space: nowrap;
  will-change: transform;
}

.news-ticker__text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

/*.news-ticker__logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}*/
.news-ticker__logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
  margin: 0 18px;
}

.news-ticker__close {
  flex: 0 0 auto;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  background: transparent;
  color: #ffffff;

  cursor: pointer;

  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.news-ticker__close:hover {
  background: rgba(0, 0, 0, 0.16);
}

.news-ticker__close i {
  font-size: 18px;
}

/* ------------------------------------------
   MOBIL
------------------------------------------ */

@media (max-width: 767px) {
  .news-ticker__inner {
    min-height: 38px;
  }
  .news-ticker__badge {
    padding: 0 12px;
    font-size: 12px;
    gap: 6px;
  }
  .news-ticker__badge i {
    font-size: 14px;
  }
  .news-ticker__text {
    font-size: 14px;
  }
  .news-ticker__close {
    width: 44px;
    height: 44px;
  }
}

/* ------------------------------------------
   MOBIL – VELMI ÚZKÉ DISPLEJE
   ------------------------------------------ */

@media (max-width: 340px) {
  .news-ticker__badge {
    padding: 0 8px;
    font-size: 10px;
    gap: 4px;
  }

  .news-ticker__badge i {
    font-size: 12px;
  }

  .news-ticker__text {
    font-size: 12px;
  }

  .news-ticker__close {
    width: 38px;
    height: 38px;
  }

  .news-ticker__close i {
    font-size: 16px;
  }
}

/* ==========================================
   TYP AKTUALITY
========================================== */

.news-ticker--danger {
  background: #c62828;
}

.news-ticker--warning {
  background: #ef6c00;
}

.news-ticker--new {
  background: #198754;
}

/* ==========================================
   ZAVŘENÍ
========================================== */

.news-ticker--hidden {
  display: none;
}

/* ==========================================
   TICKER – PRVNÍ NÁBĚH
========================================== */

.news-ticker__track--intro {
  animation: newsTickerIntro 1.8s ease-out forwards;
}

@keyframes newsTickerIntro {
  from {
    transform: translateX(100vw);
  }

  to {
    transform: translateX(0);
  }
}

/* ==========================================
   TICKER – NEKONEČNÝ LOOP
========================================== */

.news-ticker__track--loop {
  animation: newsTickerLoop var(--ticker-duration) linear infinite;
}

@keyframes newsTickerLoop {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--ticker-distance)));
  }
}

/* ==========================================
   PAUZA PŘI HOVERU
========================================== */

.news-ticker:hover .news-ticker__track--intro,
.news-ticker:hover .news-ticker__track--loop {
  animation-play-state: paused;
}

/* ==========================================
   REDUKOVANÝ POHYB
========================================== */

@media (prefers-reduced-motion: reduce) {
  .news-ticker__track--intro,
  .news-ticker__track--loop {
    animation: none;
    transform: none;
  }
}

/* ==========================================
   NEWS TICKER – PODROBNOSTI
========================================== */

.news-ticker__title {
  white-space: nowrap;
}

.news-ticker__hint {
  display: inline-flex;
  align-items: center;

  margin-left: 16px;
  padding-left: 16px;

  white-space: nowrap;

  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.news-ticker__hint-label {
  opacity: 0.6;
  font-weight: 400;
  margin-right: 7px;
}

.news-ticker__hint-path {
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.news-ticker__hint-path:hover {
  color: #fff !important;
  text-decoration: none !important;
  opacity: 0.75;
}
