/* Flash toasts. */
.aicv-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 320px;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}
.aicv-toast {
    border-radius: 0.6rem;
    border-left: 4px solid;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    pointer-events: all;
    animation: aicv-toast-in 0.25s ease;
    transition: opacity 0.3s, transform 0.3s, max-height 0.3s;
    max-height: 120px;
}
.aicv-toast.hiding {
    opacity: 0;
    transform: translateX(120%);
    max-height: 0;
}
@keyframes aicv-toast-in {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}
.aicv-toast__body {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 1rem 0.6rem;
}
.aicv-toast__icon {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 0.1rem;
}
.aicv-toast__text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
}
.aicv-toast__close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.45;
    font-size: 1rem;
    padding: 0 0 0 0.4rem;
    color: inherit;
    flex-shrink: 0;
}
.aicv-toast__close:hover { opacity: 1; }
.aicv-toast__bar {
    height: 3px;
    transform-origin: left;
    animation: aicv-bar linear forwards;
}
@keyframes aicv-bar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}
.aicv-toast--success { background: #f0fdf4; color: #166534; border-left-color: #22c55e; }
.aicv-toast--success .aicv-toast__bar { background: #22c55e; }
.aicv-toast--info    { background: #eff6ff; color: #1e40af; border-left-color: #3b82f6; }
.aicv-toast--info    .aicv-toast__bar { background: #3b82f6; }
.aicv-toast--warning { background: #fffbeb; color: #92400e; border-left-color: #f59e0b; }
.aicv-toast--warning .aicv-toast__bar { background: #f59e0b; }
.aicv-toast--danger  { background: #fef2f2; color: #991b1b; border-left-color: #ef4444; }
.aicv-toast--danger  .aicv-toast__bar { background: #ef4444; }
