/* =========================================================
   Global Flash Toast / Messages
   Jedno wspólne miejsce dla krótkich powiadomień runtime + PA.
   Dotyczy komunikatów sesyjnych Session::flash().
========================================================= */

.st-flash-toast-area {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 2147483000;
    width: min(560px, calc(100vw - 32px));
    display: grid;
    gap: 10px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.st-flash-toast {
    --st-flash-bg: rgba(13, 18, 34, 0.94);
    --st-flash-border: rgba(160, 132, 255, 0.42);
    --st-flash-glow: rgba(124, 92, 255, 0.26);
    --st-flash-icon-bg: rgba(160, 132, 255, 0.20);
    --st-flash-icon-color: #efe7ff;

    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 14px 16px;
    border: 1px solid var(--st-flash-border);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
        var(--st-flash-bg);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.42),
        0 0 34px var(--st-flash-glow);
    color: #f4f0ff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    animation:
        st-flash-toast-in 180ms ease-out forwards,
        st-flash-toast-out 360ms ease-in 4.2s forwards;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.st-flash-toast--success {
    --st-flash-border: rgba(94, 235, 157, 0.42);
    --st-flash-glow: rgba(72, 211, 134, 0.22);
    --st-flash-icon-bg: rgba(94, 235, 157, 0.16);
    --st-flash-icon-color: #a9ffd0;
}

.st-flash-toast--error {
    --st-flash-border: rgba(255, 118, 148, 0.46);
    --st-flash-glow: rgba(255, 86, 124, 0.20);
    --st-flash-icon-bg: rgba(255, 118, 148, 0.16);
    --st-flash-icon-color: #ffd0da;
}

.st-flash-toast__icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--st-flash-icon-bg);
    color: var(--st-flash-icon-color);
    font-size: 15px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.st-flash-toast__message {
    min-width: 0;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
}

@keyframes st-flash-toast-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes st-flash-toast-out {
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        visibility: hidden;
    }
}

@media (max-width: 640px) {
    .st-flash-toast-area {
        width: min(420px, calc(100vw - 24px));
    }

    .st-flash-toast {
        grid-template-columns: 26px 1fr;
        gap: 10px;
        min-height: 52px;
        padding: 12px 13px;
        border-radius: 16px;
        font-size: 13px;
    }

    .st-flash-toast__icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
}
