/* ---- Indicador offline (pill pequeño, no intrusivo) ---- */

.offline-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
  background: rgba(1, 42, 74, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e8e8e8;
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offline-banner.visible {
  opacity: 1;
  transform: translateY(0);
}

.offline-banner.done {
  background: rgba(45, 106, 79, 0.92);
}

.offline-banner-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spinner minimal */
.offline-spinner {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: offline-spin 0.8s linear infinite;
}

@keyframes offline-spin {
  to { transform: rotate(360deg); }
}

/* ---- Botones video offline ---- */

.video-offline-btn {
  position: relative;
  transition: background 0.2s, opacity 0.2s;
}

.video-offline-btn.saving {
  background: var(--sun, #f77f00);
  color: #fff;
  cursor: wait;
  pointer-events: none;
  opacity: 0.85;
}

.video-offline-btn.saved {
  background: #2d6a4f;
  color: #fff;
  cursor: default;
  opacity: 0.8;
  pointer-events: none;
}

/* ---- Toast actualizacion SW ---- */

.sw-update-toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--rose, #c1121f);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.sw-update-toast.visible {
  transform: translateX(-50%) translateY(0);
}

.sw-update-toast:hover {
  filter: brightness(1.1);
}
