.toast-container {
    position: fixed !important;

    top: 20px !important;
    right: 20px !important;

    left: auto !important;
    bottom: auto !important;
    transform: none !important;

    z-index: 99999 !important;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    pointer-events: none;
}

/* ПОЗИЦИЯ (выбирается в /settings, хранится в localStorage — pb-toast-sounds.js) */

.toast-container.pb-toast-pos--top-left {
    top: 20px !important;
    left: 20px !important;
    right: auto !important;
    bottom: auto !important;
    align-items: flex-start;
}

.toast-container.pb-toast-pos--top-right {
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    align-items: flex-end;
}

.toast-container.pb-toast-pos--bottom-left {
    bottom: 20px !important;
    left: 20px !important;
    right: auto !important;
    top: auto !important;
    align-items: flex-start;
    flex-direction: column-reverse;
}

.toast-container.pb-toast-pos--bottom-right {
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    align-items: flex-end;
    flex-direction: column-reverse;
}

.toast-container.pb-toast-pos--top-center {
    top: 20px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    align-items: center;
}

.toast-container.pb-toast-pos--bottom-center {
    bottom: 20px !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    align-items: center;
    flex-direction: column-reverse;
}

.toast-container.pb-toast-pos--bottom-left .toast + .toast,
.toast-container.pb-toast-pos--bottom-right .toast + .toast,
.toast-container.pb-toast-pos--bottom-center .toast + .toast {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
}

.toast-container .toast-wrapper {
    padding: 3px !important;
}

/* ОСНОВНАЯ КАРТОЧКА */

.toast {
    position: relative;

    display: flex;
    flex-direction: column-reverse;

    width: 240px;

    min-height: 40px;

    padding: 10px 12px 10px 46px !important;

    border-radius: 12px !important;

    background: #15161c !important;

    border: 1px solid rgba(255,255,255,.07) !important;

    color: #9497a6 !important;

    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;

    overflow: hidden;

    box-shadow:
        0 8px 18px rgba(0,0,0,.4),
        0 0 0 1px rgba(255,255,255,.02) inset;

    pointer-events: auto;
    will-change: opacity;

    animation: toastEnter .18s ease-out;
}

/* ИКОНКА В КРУГЕ */

.toast::before {
    content: "";

    position: absolute;
    top: 9px;
    left: 9px;

    width: 26px;
    height: 26px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

/* ЗАГОЛОВОК (Ошибка / Успешно / ...) — выводится над текстом сообщения */

.toast::after {
    content: attr(data-toast-label);

    display: block;

    margin-bottom: 2px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
}

/* SUCCESS */

.toast--success {
    border-color: rgba(34,197,94,.18) !important;
}

.toast--success::before {
    content: "\2713";
    color: #22c55e;
    background: rgba(34,197,94,.12);
    box-shadow: inset 0 0 0 1.5px rgba(34,197,94,.35);
}

.toast--success::after {
    content: "Успешно";
    color: #22c55e;
}

.toast-progressbar--success {
    background: #22c55e !important;
}

/* ERROR */

.toast--error {
    border-color: rgba(239,68,68,.18) !important;
}

.toast--error::before {
    content: "\2715";
    color: #ef4444;
    background: rgba(239,68,68,.12);
    box-shadow: inset 0 0 0 1.5px rgba(239,68,68,.35);
}

.toast--error::after {
    content: "Ошибка";
    color: #ef4444;
}

.toast-progressbar--error {
    background: #ef4444 !important;
}

/* WARNING */

.toast--warning {
    border-color: rgba(245,158,11,.18) !important;
}

.toast--warning::before {
    content: "!";
    color: #f59e0b;
    background: rgba(245,158,11,.12);
    box-shadow: inset 0 0 0 1.5px rgba(245,158,11,.35);
}

.toast--warning::after {
    content: "Внимание";
    color: #f59e0b;
}

.toast-progressbar--warning {
    background: #f59e0b !important;
}

/* INFO */

.toast--info {
    border-color: rgba(59,130,246,.18) !important;
}

.toast--info::before {
    content: "i";
    color: #3b82f6;
    background: rgba(59,130,246,.12);
    box-shadow: inset 0 0 0 1.5px rgba(59,130,246,.35);
}

.toast--info::after {
    content: "Информация";
    color: #3b82f6;
}

.toast-progressbar--info {
    background: #3b82f6 !important;
}

/* ПРОГРЕСС */

.toast-progressbar {
    height: 2px !important;
    opacity: .9 !important;
    border-radius: 999px;
}

/* СТЕК УВЕДОМЛЕНИЙ */

.toast + .toast {
    margin-top: 6px !important;
}

/* АНИМАЦИЯ */

@keyframes toastEnter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* МОБИЛКИ */

@media (max-width: 575px) {
    .toast-container {
        width: calc(100vw - 20px);
    }

    .toast {
        width: 100%;
    }
}
