/* ═══════════════════════════════════════════════════════════════════
   MESSAGES (Django messages framework)
   Extraído de base.css na Sessão 5.
   ═══════════════════════════════════════════════════════════════════ */
.ia-messages {
    position: fixed;
    top: 72px;          /* fallback — JS ajusta para baixo da navbar/banner */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 100%;
    max-width: var(--maxw);
    padding: 0 24px;
    pointer-events: none;
}

.ia-messages .ia-msg {
    pointer-events: auto;
    animation: ia-msg-in 0.3s ease;
}

@keyframes ia-msg-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ia-msg-out {
    from { opacity: 1; transform: translateY(0); max-height: 200px; }
    to   { opacity: 0; transform: translateY(-8px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; }
}

.ia-msg {
    padding: 14px 44px 14px 20px;   /* espaço à direita para o X */
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.ia-msg--out {
    animation: ia-msg-out 0.28s ease forwards;
}

.ia-msg__text {
    display: block;
}

.ia-msg__close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: inherit;
    opacity: .65;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    line-height: 1;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ia-msg__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}
.ia-msg__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.ia-msg-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--color-green);
}

.ia-msg-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-red);
}

.ia-msg-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--color-amber);
}

.ia-msg-info {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--color-cyan);
}
