/* Notification / alert cards: bottom-right stack, type accents, icon + vertical
   divider, fade-in/out, "x" to close, configurable width. See ui/notifications.js. */

.al-notifications {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--al-gap);
  z-index: 1000;
  pointer-events: none; /* clicks fall through the gaps; cards re-enable it */
  max-width: calc(100vw - 32px);
}

.al-alert {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--al-card-bg);
  color: var(--al-card-fg);
  border-left: 4px solid var(--al-info);
  border-radius: var(--al-radius);
  box-shadow: var(--al-card-shadow);
  width: var(--al-width-third);
  min-width: var(--al-width-min);
  max-width: var(--al-width-max);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.al-alert--in {
  opacity: 1;
  transform: translateY(0);
}
.al-alert--leaving {
  opacity: 0;
  transform: translateY(8px);
}

/* configurable widths */
.al-w-quarter {
  width: var(--al-width-quarter);
}
.al-w-third {
  width: var(--al-width-third);
}

/* type accents */
.al-alert--info {
  border-left-color: var(--al-info);
}
.al-alert--success {
  border-left-color: var(--al-success);
}
.al-alert--warning {
  border-left-color: var(--al-warning);
}
.al-alert--error {
  border-left-color: var(--al-error);
}

.al-alert__icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}
.al-alert__divider {
  flex: 0 0 auto;
  align-self: stretch;
  width: 1px;
  background: currentColor;
  opacity: 0.25;
}
.al-alert__text {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.al-alert__close {
  flex: 0 0 auto;
  padding: 0 2px;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}
.al-alert__close:hover {
  opacity: 1;
}

/* On narrow screens the cards span the gutter width instead of a viewport fraction. */
@media (max-width: 640px) {
  .al-notifications {
    left: 16px;
    right: 16px;
  }
  .al-alert,
  .al-w-quarter,
  .al-w-third {
    width: auto;
    min-width: 0;
    max-width: none;
  }
}
