/* Toast notification system */

#toast-container {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: calc(100% - 2rem);
  max-width: 360px;
}

.toast {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.toast--exiting {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.toast--info    { background: var(--tg-theme-button-color, #3390ec); }
.toast--success { background: #34c759; }
.toast--warning { background: #ff9500; }
.toast--error   { background: #ff3b30; }

/* Network offline banner */
#network-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 7000;
  background: #ff9500;
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
}

#network-banner[hidden] {
  display: none;
}

/* Error bubble inside chat */
.bubble--error {
  border: 1px solid rgba(255, 59, 48, 0.5);
  border-left: 3px solid #ff3b30;
}

.bubble--error__retry {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border: 1px solid var(--tg-theme-button-color, #3390ec);
  border-radius: 6px;
  color: var(--tg-theme-button-color, #3390ec);
  font-size: 0.82rem;
  cursor: pointer;
  background: none;
  font-family: inherit;
  min-height: 32px;
}

.bubble--error__retry:active {
  opacity: 0.7;
}
