/* ══════════════════════════════════════════════════════════════
   Alerts — static/css/components/alerts.css
   Feedback alerts with icon alignment.
   Prefix: uc-alert to avoid Bootstrap collision.
   Uses design tokens from root.css.
   ══════════════════════════════════════════════════════════════ */

.uc-alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.uc-messages-container-floating {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 1080;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.uc-messages-container-floating .uc-alert {
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}

.uc-alert .bi {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.uc-alert strong {
  display: block;
  margin-bottom: 2px;
}

/* ── Variants ─────────────────────────────────────────────── */
.uc-alert-success {
  background: var(--success-light);
  color: var(--primary-dark);
}

.uc-alert-error {
  background: var(--error-light);
  color: var(--error-text);
}

.uc-alert-warning {
  background: var(--warning-light);
  color: var(--warning-text);
}

.uc-alert-info {
  background: var(--info-light);
  color: var(--info-text);
}

/* ── Dismissible ─────────────────────────────────────────── */
.uc-alert-dismissible {
  position: relative;
  padding-right: 44px;
  animation: uc-alert-slide-in .3s ease-out;
}

.uc-alert-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.4;
  font-size: 12px;
  padding: 0;
  line-height: 1;
  color: inherit;
  transition: opacity .2s, background .2s;
}

.uc-alert-close .bi {
  font-size: 12px;
}

.uc-alert-close:hover {
  opacity: 0.8;
  background: rgba(0, 0, 0, .08);
}

/* ── Fade out (added by JS) ──────────────────────────────── */
.uc-alert-fade-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s ease, transform .4s ease;
}

@keyframes uc-alert-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .uc-messages-container-floating {
    top: 72px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}
