/* Plovoucí oznámení vpravo — jednotný styl napříč aplikací */

.app-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    color: #0f172a;
    opacity: 0;
    transform: translateX(1.25rem);
    animation: app-toast-in 0.32s ease-out forwards;
}

.app-toast.is-leaving {
    animation: app-toast-out 0.28s ease-in forwards;
}

.app-toast__icon {
    flex: 0 0 auto;
    font-size: 1.15rem;
    line-height: 1;
    margin-top: 0.1rem;
}

.app-toast__body {
    flex: 1 1 auto;
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 500;
}

.app-toast__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.55;
    padding: 0.1rem;
    line-height: 1;
    cursor: pointer;
}

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

.app-toast--success {
    border-color: rgba(25, 135, 84, 0.25);
    background: #f0fdf4;
}

.app-toast--success .app-toast__icon {
    color: #198754;
}

.app-toast--danger {
    border-color: rgba(220, 53, 69, 0.28);
    background: #fff5f5;
}

.app-toast--danger .app-toast__icon {
    color: #dc3545;
}

.app-toast--warning {
    border-color: rgba(255, 193, 7, 0.4);
    background: #fffbeb;
}

.app-toast--warning .app-toast__icon {
    color: #b45309;
}

.app-toast--info {
    border-color: rgba(13, 202, 240, 0.35);
    background: #f0f9ff;
}

.app-toast--info .app-toast__icon {
    color: #0dcaf0;
}

@keyframes app-toast-in {
    from {
        opacity: 0;
        transform: translateX(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes app-toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(1.25rem);
    }
}

@media (max-width: 575.98px) {
    .app-toast-stack {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }

    .app-toast {
        transform: translateY(1rem);
        animation-name: app-toast-in-mobile;
    }

    .app-toast.is-leaving {
        animation-name: app-toast-out-mobile;
    }
}

@keyframes app-toast-in-mobile {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes app-toast-out-mobile {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(1rem);
    }
}
