/* ============================================================
   alerts.css
   Slide-down global alert system
   ============================================================ */

.alertbar{
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  z-index: 200;
  pointer-events: none;
}

.alert{
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;

  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(24,25,27,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);

  opacity: 0;
  transform: translateY(-18px);
  transition: opacity .18s ease, transform .18s ease;
}

.alert::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:4px;
  background: var(--border);
}

.alert.is-show{
  opacity: 1;
  transform: translateY(0);
}

.alert + .alert{
  margin-top: 10px;
}

.alert .msg{
  color: var(--text);
}

.alert .meta{
  color: var(--muted);
  font-size: 13px;
  margin-top:2px;
}

.alert .x{
  appearance:none;
  border:0;
  background: transparent;
  color: var(--muted);
  cursor:pointer;
  padding: 4px 6px;
  border-radius: 10px;
}

.alert .x:hover{
  color: var(--text);
  background: var(--glass);
}

/* Variants */
.alert.success{
  border-color: rgba(80,200,120,.28);
}

.alert.success::before{
  background: #50c878;
  box-shadow: 0 0 16px rgba(80,200,120,.45);
}

.alert.error{
  border-color: rgba(255,80,80,.32);
}

.alert.error::before{
  background: #ff5050;
  box-shadow: 0 0 16px rgba(255,80,80,.42);
}
