/* Floating "cancel download" bar for downloader tools without their own control. */
.ts-cancelbar {
  position: fixed;
  left: 50%;
  bottom: 1.15rem;
  z-index: 2147483000;
  transform: translate(-50%, 140%);
  display: flex;
  align-items: center;
  gap: .85rem;
  max-width: min(94vw, 30rem);
  padding: .7rem .8rem .7rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .26);
  background: rgba(2, 6, 23, .94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  color: #e2e8f0;
  font-size: .84rem;
  opacity: 0;
  visibility: hidden;
  transition: transform .26s ease, opacity .26s ease, visibility .26s;
}
.ts-cancelbar.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}
.ts-cancelbar__dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, .85);
  animation: ts-cancelbar-pulse 1.5s ease-in-out infinite;
}
.ts-cancelbar__text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  font-weight: 700;
}
.ts-cancelbar__hint {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  color: #94a3b8;
}
.ts-cancelbar__btn {
  flex-shrink: 0;
  padding: .5rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, .5);
  background: rgba(127, 29, 29, .5);
  color: #fecaca;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.ts-cancelbar__btn:hover:not(:disabled) {
  background: rgba(185, 28, 28, .8);
  border-color: #f87171;
  color: #fff;
}
.ts-cancelbar__btn:disabled {
  opacity: .65;
  cursor: default;
}
.ts-cancelbar.is-stopping .ts-cancelbar__dot {
  background: #f87171;
  box-shadow: 0 0 10px rgba(248, 113, 113, .85);
  animation: none;
}

@keyframes ts-cancelbar-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}

@media (max-width: 560px) {
  .ts-cancelbar {
    left: .6rem;
    right: .6rem;
    bottom: .7rem;
    max-width: none;
    transform: translate(0, 140%);
  }
  .ts-cancelbar.is-open { transform: translate(0, 0); }
  .ts-cancelbar__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-cancelbar { transition: none; }
  .ts-cancelbar__dot { animation: none; }
}
