/**
 * Service Worker Update Toast
 * Non-intrusive notification when a new version is available.
 */

.sw-update-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg, #2a2a2a);
  color: var(--text-primary, #e0e0e0);
  border: 1px solid var(--border-color, #444);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgb(0 0 0 / 30%);
  z-index: 10000;
  transform: translateY(150%);
  transition: transform 0.3s ease;
  font-size: 0.875rem;
  max-width: 400px;
}

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

.sw-update-toast__message {
  flex: 1;
  white-space: nowrap;
}

.sw-update-toast__action {
  padding: 0.375rem 0.75rem;
  background: var(--accent-color, #4a9eff);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.sw-update-toast__action:hover {
  background: var(--accent-hover, #3a8eef);
}

.sw-update-toast__action:focus-visible {
  outline: 2px solid var(--accent-color, #4a9eff);
  outline-offset: 2px;
}

.sw-update-toast__dismiss {
  padding: 0.375rem 0.5rem;
  background: none;
  color: var(--text-secondary, #999);
  border: none;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}

.sw-update-toast__dismiss:hover {
  color: var(--text-primary, #e0e0e0);
}

.sw-update-toast__dismiss:focus-visible {
  outline: 2px solid var(--accent-color, #4a9eff);
  outline-offset: 2px;
}

/* Mobile: full width at bottom */
@media (max-width: 480px) {
  .sw-update-toast {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    max-width: none;
  }
}
