/* Top-right flash toasts — success / error / warning / info */

.nyaribari-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    width: min(400px, calc(100vw - 2rem));
    pointer-events: none;
}

.nyaribari-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
    font-size: 0.92rem;
    line-height: 1.4;
    animation: nyaribari-toast-in 0.28s ease;
}

.nyaribari-toast.is-hiding {
    animation: nyaribari-toast-out 0.28s ease forwards;
}

.nyaribari-toast__icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.05rem;
}

.nyaribari-toast__body {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.nyaribari-toast__close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.8;
    padding: 0;
    line-height: 1;
    font-size: 1.15rem;
    cursor: pointer;
}

.nyaribari-toast__close:hover {
    opacity: 1;
}

.nyaribari-toast--success {
    background: #157347;
}

.nyaribari-toast--error,
.nyaribari-toast--danger {
    background: #b02a37;
}

.nyaribari-toast--warning {
    background: #c77c02;
}

.nyaribari-toast--info {
    background: #087990;
}

@keyframes nyaribari-toast-in {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes nyaribari-toast-out {
    to {
        opacity: 0;
        transform: translateX(18px);
    }
}

@media (max-width: 576px) {
    .nyaribari-toast-stack {
        top: 0.65rem;
        right: 0.65rem;
        left: 0.65rem;
        width: auto;
        align-items: stretch;
    }
}
