/* view/custom-alert.css - improved, explicit icon element and color-coded per type */

/* container */
#global-alert-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none; /* allow clicks through empty space */
}

/* base alert */
.global-alert {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  min-width: 220px;
  max-width: 360px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  transition: transform .22s cubic-bezier(.2,.9,.2,1), opacity .22s ease;
  display: flex;
  align-items: center;
}

/* visible state */
.global-alert.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* hiding state */
.global-alert.hiding {
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
}

/* left icon */
.ga-left {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex: 0 0 36px;
  font-size: 18px;
  background: rgba(255,255,255,0.06);
}

/* message body */
.ga-body { flex: 1 1 auto; }
.ga-message { line-height: 1.2; color: inherit; font-weight: 600; }

/* close button */
.ga-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  margin-left: 8px;
  opacity: 0.9;
}

/* type styles */
/* Success */
.global-alert.success {
  background: linear-gradient(135deg, #2ecc71 0%, #21a65b 100%);
}
.global-alert.success .ga-left { background: rgba(255,255,255,0.07); }

/* Error */
.global-alert.error {
  background: linear-gradient(135deg, #ff6b6b 0%, #e23b3b 100%);
}
.global-alert.error .ga-left { background: rgba(255,255,255,0.06); }

/* Warning */
.global-alert.warning {
  background: linear-gradient(135deg, #ffb74d 0%, #ff9800 100%);
  color: #1f1f1f;
}
.global-alert.warning .ga-left { background: rgba(0,0,0,0.06); }

/* Info */
.global-alert.info {
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
}
.global-alert.info .ga-left { background: rgba(255,255,255,0.06); }

/* responsive */
@media (max-width: 520px) {
  #global-alert-container {
    left: 12px;
    right: 12px;
    align-items: center;
  }
  .global-alert { width: calc(100% - 24px); max-width: none; }
}
