.toast-container{
    position:fixed;
    top:20px;
    right:20px;
    left:auto;
    bottom:auto;
    z-index:99999;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:10px;
    pointer-events:none;
    contain:layout style;
}

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

.toast-wrapper{
    pointer-events:none;
}

/* ============ Структура (общая для сайта и админки) ============ */
.toast, .toast *{
    box-sizing:border-box;
}
.toast{
    position:relative;
    display:flex;
    align-items:flex-start;
    gap:11px;
    width:320px;
    min-height:44px;
    padding:13px 34px 13px 16px;
    border-radius:14px;
    overflow:hidden;
    cursor:pointer;
    transform:translateZ(0);
    animation:pbToastIn .38s cubic-bezier(.16,1,.3,1);
    pointer-events:auto;
}
.toast.is-leaving{
    animation:pbToastOut .24s cubic-bezier(.4,0,1,1) forwards;
}

.toast::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:4px;
    border-radius:4px 0 0 4px;
}

.toast__icon{
    flex-shrink:0;
    flex-grow:0;
    display:flex;
    align-items:center;
    justify-content:center;
    width:28px;
    max-width:28px;
    height:28px;
    max-height:28px;
    margin-top:1px;
}
.toast__icon svg{display:block;width:16px;height:16px;flex-shrink:0}

.toast__body{
    flex-shrink:1;
    flex-grow:1;
    min-width:0;
    max-width:100%;
    display:flex;
    flex-direction:column;
    gap:1px;
    padding-top:1px;
}
.toast__title{
    display:block;
    font-size:13px;
    font-weight:700;
    letter-spacing:-.01em;
    line-height:1.35;
}
.toast__text{
    display:block;
    font-size:12.5px;
    font-weight:500;
    line-height:1.42;
    overflow-wrap:anywhere;
}

.toast__close{
    position:absolute;
    top:10px;
    right:10px;
    width:22px;
    height:22px;
    padding:0;
    border:0;
    border-radius:7px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    opacity:0;
    transform:scale(.8);
    transition:opacity .15s ease,transform .15s ease,background .15s ease;
}
.toast__close svg{width:11px;height:11px}
.toast:hover .toast__close{opacity:1;transform:scale(1)}

.toast-progressbar{
    position:absolute;
    left:4px;
    bottom:0;
    width:calc(100% - 4px);
    height:2px;
    opacity:.7;
    transform-origin:left center;
    animation:pbToastBar linear forwards;
}

@keyframes pbToastIn{
    from{opacity:0;transform:translate3d(24px,0,0) scale(.96)}
    to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
@keyframes pbToastOut{
    from{opacity:1;transform:translate3d(0,0,0) scale(1);max-height:200px;margin-bottom:0}
    to{opacity:0;transform:translate3d(24px,0,0) scale(.96)}
}
@keyframes pbToastBar{
    from{transform:scaleX(1)}
    to{transform:scaleX(0)}
}

.pb-toast-pos--top-left .toast,
.pb-toast-pos--bottom-left .toast{
    animation-name:pbToastInLeft;
}
@keyframes pbToastInLeft{
    from{opacity:0;transform:translate3d(-24px,0,0) scale(.96)}
    to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
.pb-toast-pos--top-left .toast.is-leaving,
.pb-toast-pos--bottom-left .toast.is-leaving{
    animation-name:pbToastOutLeft;
}
@keyframes pbToastOutLeft{
    from{opacity:1;transform:translate3d(0,0,0) scale(1)}
    to{opacity:0;transform:translate3d(-24px,0,0) scale(.96)}
}

.pb-toast-pos--top-center .toast,
.pb-toast-pos--bottom-center .toast{
    animation-name:pbToastInDown;
}
@keyframes pbToastInDown{
    from{opacity:0;transform:translate3d(0,-14px,0) scale(.96)}
    to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
.pb-toast-pos--bottom-center .toast{
    animation-name:pbToastInUp;
}
@keyframes pbToastInUp{
    from{opacity:0;transform:translate3d(0,14px,0) scale(.96)}
    to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
.pb-toast-pos--top-center .toast.is-leaving{
    animation-name:pbToastOutUp;
}
.pb-toast-pos--bottom-center .toast.is-leaving{
    animation-name:pbToastOutDown;
}
@keyframes pbToastOutUp{
    from{opacity:1;transform:translate3d(0,0,0) scale(1)}
    to{opacity:0;transform:translate3d(0,-14px,0) scale(.96)}
}
@keyframes pbToastOutDown{
    from{opacity:1;transform:translate3d(0,0,0) scale(1)}
    to{opacity:0;transform:translate3d(0,14px,0) scale(.96)}
}

@media (max-width:575px){
    .toast-container{width:calc(100vw - 24px)}
    .toast{width:100%}
}
@media (prefers-reduced-motion:reduce){
    .toast{animation-duration:.01ms}
    .toast.is-leaving{animation-duration:.01ms}
    .toast-progressbar{animation:none;transform:scaleX(0)}
}

/* ============ Визуал: публичный сайт (по умолчанию) ============ */
.toast{
    background:rgba(21,22,28,.88);
    border:1px solid rgba(255,255,255,.08);
    color:#9497a6;
    box-shadow:0 12px 28px -8px rgba(0,0,0,.5),0 4px 10px -4px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter:blur(20px) saturate(160%);
    -webkit-backdrop-filter:blur(20px) saturate(160%);
}
.toast__icon{
    border-radius:50%;
    font-size:12px;
    font-weight:800;
}
.toast__title{color:#f1f2f6}
.toast__close{background:rgba(255,255,255,.07);color:#9497a6}
.toast__close:hover{background:rgba(255,255,255,.14);color:#f1f2f6}

.toast--success::before{background:#22c55e}
.toast--success .toast__icon{color:#22c55e;background:rgba(34,197,94,.14)}
.toast-progressbar--success{background:#22c55e}

.toast--error::before{background:#ef4444}
.toast--error .toast__icon{color:#ef4444;background:rgba(239,68,68,.14)}
.toast-progressbar--error{background:#ef4444}

.toast--warning::before{background:#f59e0b}
.toast--warning .toast__icon{color:#f59e0b;background:rgba(245,158,11,.14)}
.toast-progressbar--warning{background:#f59e0b}

.toast--info::before{background:#3b82f6}
.toast--info .toast__icon{color:#3b82f6;background:rgba(59,130,246,.14)}
.toast-progressbar--info{background:#3b82f6}

/* ============ Визуал: админка (liquid glass, в духе macOS Notification Center) ============ */
body.has-dc-sidebar .toast{
    width:300px;
    padding:13px 32px 13px 15px;
    border-radius:16px;
    background:rgba(250,250,252,.82);
    border:1px solid rgba(255,255,255,.6);
    color:#3a4250;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.4),
        inset 1px 1px 0 rgba(255,255,255,.7),
        0 20px 44px -14px rgba(15,23,42,.32),
        0 6px 16px -6px rgba(15,23,42,.2);
    backdrop-filter:blur(32px) saturate(1.9);
    -webkit-backdrop-filter:blur(32px) saturate(1.9);
}
body[data-admin-theme="dark"].has-dc-sidebar .toast{
    background:rgba(28,29,34,.78);
    border-color:rgba(255,255,255,.14);
    color:#a9afbc;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        inset 1px 1px 0 rgba(255,255,255,.12),
        0 20px 44px -14px rgba(0,0,0,.6),
        0 6px 16px -6px rgba(0,0,0,.4);
}

body.has-dc-sidebar .toast::before{
    width:3px;
    border-radius:0;
    opacity:.9;
}

body.has-dc-sidebar .toast__icon{
    border-radius:10px;
    color:#fff;
    position:relative;
    overflow:hidden;
}
body.has-dc-sidebar .toast__icon::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(155deg,rgba(255,255,255,.4),transparent 60%);
}
body.has-dc-sidebar .toast__icon svg{position:relative;z-index:1}

body.has-dc-sidebar .toast__title{color:#0f172a;font-size:12.5px}
body[data-admin-theme="dark"].has-dc-sidebar .toast__title{color:#f1f5f9}
body.has-dc-sidebar .toast__text{color:#5b6472;font-size:12px}
body[data-admin-theme="dark"].has-dc-sidebar .toast__text{color:#9aa4b5}

body.has-dc-sidebar .toast__close{background:rgba(15,23,42,.07);color:#8a94a6}
body.has-dc-sidebar .toast__close:hover{background:rgba(15,23,42,.14);color:#3a4250}
body[data-admin-theme="dark"].has-dc-sidebar .toast__close{background:rgba(255,255,255,.1);color:#8a94a6}
body[data-admin-theme="dark"].has-dc-sidebar .toast__close:hover{background:rgba(255,255,255,.16);color:#e2e8f0}

body.has-dc-sidebar .toast--success::before{background:linear-gradient(180deg,#4ad8b0,#0f9e78)}
body.has-dc-sidebar .toast--success .toast__icon{background:linear-gradient(155deg,#4ad8b0,#0f9e78);box-shadow:0 3px 10px -3px rgba(15,158,120,.55)}
body.has-dc-sidebar .toast-progressbar--success{background:linear-gradient(90deg,#4ad8b0,#0f9e78)}

body.has-dc-sidebar .toast--error::before{background:linear-gradient(180deg,#ff6b60,#d9362b)}
body.has-dc-sidebar .toast--error .toast__icon{background:linear-gradient(155deg,#ff6b60,#d9362b);box-shadow:0 3px 10px -3px rgba(217,54,43,.55)}
body.has-dc-sidebar .toast-progressbar--error{background:linear-gradient(90deg,#ff6b60,#d9362b)}

body.has-dc-sidebar .toast--warning::before{background:linear-gradient(180deg,#ffb648,#e07f0e)}
body.has-dc-sidebar .toast--warning .toast__icon{background:linear-gradient(155deg,#ffb648,#e07f0e);box-shadow:0 3px 10px -3px rgba(224,127,14,.55)}
body.has-dc-sidebar .toast-progressbar--warning{background:linear-gradient(90deg,#ffb648,#e07f0e)}

body.has-dc-sidebar .toast--info::before{background:linear-gradient(180deg,#3aa0ff,#0060df)}
body.has-dc-sidebar .toast--info .toast__icon{background:linear-gradient(155deg,#3aa0ff,#0060df);box-shadow:0 3px 10px -3px rgba(0,96,223,.55)}
body.has-dc-sidebar .toast-progressbar--info{background:linear-gradient(90deg,#3aa0ff,#0060df)}
