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

.toast-container.pb-toast-pos--top-left{top:18px;left:18px;right:auto;bottom:auto;align-items:flex-start}
.toast-container.pb-toast-pos--top-right{top:18px;right:18px;left:auto;bottom:auto;align-items:flex-end}
.toast-container.pb-toast-pos--bottom-left{bottom:18px;left:18px;right:auto;top:auto;align-items:flex-start;flex-direction:column-reverse}
.toast-container.pb-toast-pos--bottom-right{bottom:18px;right:18px;left:auto;top:auto;align-items:flex-end;flex-direction:column-reverse}
.toast-container.pb-toast-pos--top-center{top:18px;left:50%;right:auto;bottom:auto;transform:translateX(-50%);align-items:center}
.toast-container.pb-toast-pos--bottom-center{bottom:18px;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:10px;
    width:300px;
    min-height:40px;
    padding:11px 34px 13px 12px;
    border-radius:14px;
    overflow:hidden;
    cursor:pointer;
    transform:translateZ(0);
    animation:pbToastIn .32s cubic-bezier(.22,.9,.32,1);
    pointer-events:auto;
}
.toast.is-leaving{
    animation:pbToastOut .22s cubic-bezier(.32,0,.67,0) forwards;
}

.toast__icon{
    flex-shrink:0;
    flex-grow:0;
    display:flex;
    align-items:center;
    justify-content:center;
    width:26px;
    max-width:26px;
    height:26px;
    max-height:26px;
}
.toast__icon svg{display:block;width:15px;height:15px;flex-shrink:0}

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

.toast__close{
    position:absolute;
    top:9px;
    right:9px;
    width:20px;
    height:20px;
    padding:0;
    border:0;
    border-radius:6px;
    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:0;
    bottom:0;
    width:100%;
    height:2px;
    opacity:.85;
    transform-origin:left center;
    animation:pbToastBar linear forwards;
}

@keyframes pbToastIn{
    from{opacity:0;transform:translate3d(0,-10px,0) scale(.94)}
    to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}
@keyframes pbToastOut{
    from{opacity:1;transform:translate3d(0,0,0) scale(1)}
    to{opacity:0;transform:translate3d(0,-8px,0) scale(.94)}
}
@keyframes pbToastBar{
    from{transform:scaleX(1)}
    to{transform:scaleX(0)}
}
.pb-toast-pos--bottom-left .toast,
.pb-toast-pos--bottom-right .toast,
.pb-toast-pos--bottom-center .toast{
    animation-name:pbToastInUp;
}
@keyframes pbToastInUp{
    from{opacity:0;transform:translate3d(0,10px,0) scale(.94)}
    to{opacity:1;transform:translate3d(0,0,0) scale(1)}
}

@media (max-width:575px){
    .toast-container{width:calc(100vw - 20px)}
    .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:#15161c;
    border:1px solid rgba(255,255,255,.07);
    color:#9497a6;
    box-shadow:0 8px 20px rgba(0,0,0,.42),inset 0 0 0 1px rgba(255,255,255,.02);
}
.toast__icon{
    border-radius:50%;
    font-size:12px;
    font-weight:800;
}
.toast__title{color:#e6e7ec}
.toast__close{background:rgba(255,255,255,.06);color:#9497a6}
.toast__close:hover{background:rgba(255,255,255,.12);color:#e6e7ec}

.toast--success .toast__icon{color:#22c55e;background:rgba(34,197,94,.12);box-shadow:inset 0 0 0 1.5px rgba(34,197,94,.35)}
.toast--success .toast__title{color:#22c55e}
.toast-progressbar--success{background:#22c55e}

.toast--error .toast__icon{color:#ef4444;background:rgba(239,68,68,.12);box-shadow:inset 0 0 0 1.5px rgba(239,68,68,.35)}
.toast--error .toast__title{color:#ef4444}
.toast-progressbar--error{background:#ef4444}

.toast--warning .toast__icon{color:#f59e0b;background:rgba(245,158,11,.12);box-shadow:inset 0 0 0 1.5px rgba(245,158,11,.35)}
.toast--warning .toast__title{color:#f59e0b}
.toast-progressbar--warning{background:#f59e0b}

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

/* ============ Визуал: админка (liquid glass, компактный, инновационный) ============ */
body.has-dc-sidebar .toast{
    width:280px;
    padding:10px 32px 10px 10px;
    gap:9px;
    border-radius:16px;
    background:rgb(250,250,252);
    border:1px solid rgba(255,255,255,.8);
    color:#3a4250;
    box-shadow:0 1px 1px rgba(255,255,255,.6) inset,0 16px 36px -16px rgba(15,23,42,.36),0 4px 12px -4px rgba(15,23,42,.18);
    backdrop-filter:blur(28px) saturate(1.9);
    -webkit-backdrop-filter:blur(28px) saturate(1.9);
}
body[data-admin-theme="dark"].has-dc-sidebar .toast{
    background:rgb(30,31,35);
    border-color:rgba(255,255,255,.1);
    color:#a9afbc;
    box-shadow:0 1px 1px rgba(255,255,255,.06) inset,0 16px 36px -16px rgba(0,0,0,.65),0 4px 12px -4px rgba(0,0,0,.45);
}

body.has-dc-sidebar .toast__icon{
    border-radius:9px;
    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,.35),transparent 60%);
}
body.has-dc-sidebar .toast__icon svg{position:relative;z-index:1}

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

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

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

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

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

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