/* css/alerts.css */
#alerts-container {
  position: fixed !important;
  top: 16px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  display: flex;
  flex-direction: column; /* stack alerts downward */
  gap: 10px;
  z-index: 99999;
  align-items: center;
}

.alert-toast {
  min-width: 240px;
  max-width: 360px;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px 12px 44px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  position: relative;
  opacity: 0;
  transform: translateY(-10px); /* slide down */
  transition: opacity .15s ease, transform .15s ease;
}

.alert-toast[data-show="true"] {
  opacity: 1;
  transform: translateY(0);
}

.alert-toast .alert-title { font-weight: 700; margin: 0 0 2px 0; }
.alert-toast .alert-message { margin: 0; }

.alert-toast .alert-close {
  position: absolute;
  right: 8px;
  top: 6px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.alert-toast .alert-close:hover { opacity: 1; }

/* Icon circle */
.alert-toast::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #888;
}

/* Types */
.alert-success { background: #0f5132; }
.alert-success::before { background: #25D366; }
.alert-info    { background: #0d47a1; }
.alert-info::before { background: #64b5f6; }
.alert-error   { background: #5a1b1b; }
.alert-error::before { background: #ff6b6b; }

/* Progress bar */
.alert-toast .alert-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px; width: 100%;
  background: rgba(255,255,255,.25);
  overflow: hidden;
}
.alert-toast .alert-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  background: rgba(255,255,255,.9);
  transition: transform linear;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .alert-toast { transition: none; }
  .alert-toast .alert-progress > span { transition: none; }
}

/* Mobile: still center top */
@media (max-width: 480px) {
  #alerts-container {
    top: 12px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
  }
}
