/* Portal flash + live notification toasts */
.ip-toast-stack,
#portal-notification-toasts {
    position: fixed;
    top: calc(var(--ip-header-height, 64px) + 12px);
    right: 1.5rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 400px;
    width: calc(100% - 2rem);
    pointer-events: none;
}

.ip-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.14);
    color: #0f172a;
    overflow: hidden;
    position: relative;
}

.ip-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #3b82f6;
}

.ip-toast__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: #eef3ff;
    color: #3b82f6;
}

.ip-toast__body {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 1px;
}

.ip-toast__title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.ip-toast__message {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    color: #0f172a;
    word-break: break-word;
}

.ip-toast__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.ip-toast__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.ip-toast--success::before { background: #059669; }
.ip-toast--success .ip-toast__icon { background: #ecfdf5; color: #059669; }
.ip-toast--success .ip-toast__title { color: #059669; }

.ip-toast--danger::before,
.ip-toast--error::before { background: #dc2626; }
.ip-toast--danger .ip-toast__icon,
.ip-toast--error .ip-toast__icon { background: #fef2f2; color: #dc2626; }
.ip-toast--danger .ip-toast__title,
.ip-toast--error .ip-toast__title { color: #dc2626; }

.ip-toast--warning::before { background: #d97706; }
.ip-toast--warning .ip-toast__icon { background: #fffbeb; color: #d97706; }
.ip-toast--warning .ip-toast__title { color: #d97706; }

.ip-toast--info::before { background: #0ea5e9; }
.ip-toast--info .ip-toast__icon { background: #e0f2fe; color: #0284c7; }
.ip-toast--info .ip-toast__title { color: #0284c7; }

.ip-toast--enter {
    animation: ip-toast-in 0.28s ease-out;
}

.ip-toast--leave {
    animation: ip-toast-out 0.26s ease-in forwards;
}

@keyframes ip-toast-in {
    from { opacity: 0; transform: translateY(-10px) translateX(12px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes ip-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px) translateX(8px); }
}

@media (max-width: 991px) {
    .ip-toast-stack,
    #portal-notification-toasts {
        right: 1rem;
        left: 1rem;
        max-width: none;
        width: auto;
    }
}
