/* Sushido — единен вид на известията (тостове), скриптът е notify.js.
   Език на сайта: тъмна карта с 8px радиус и тънка рамка (като продуктовите карти), плътен цветен знак с бяла иконка (като оранжевата цена и зеления бутон),
   заглавия с Zaglaviq в главни букви (като имената на продуктите), без странични ленти, прогрес и светещи сенки.
   Телефон: отгоре, компактно, извън зоната на палеца. Компютър: горе вдясно под лентата. */
#sd-toasts {
    position: fixed; z-index: 110000; top: 82px; right: 20px; width: 340px; max-width: calc(100vw - 24px);
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.sd-toast {
    --sd-a: #2ecc71; --sd-b: #1a9e52;
    position: relative; pointer-events: auto; cursor: pointer;
    display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 9px 9px 9px 9px;
    background: linear-gradient(135deg, rgba(34, 34, 34, .98), rgba(22, 22, 22, .99));
    color: #fff; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
    font: 500 14px/1.35 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    opacity: 0; transform: translateY(-6px);
    transition: transform .22s ease, opacity .2s ease;
    -webkit-tap-highlight-color: transparent; touch-action: pan-x;
}
.sd-toast.show { opacity: 1; transform: none; }
.sd-toast.hide { opacity: 0; transform: translateY(-6px); transition: transform .18s ease-in, opacity .15s ease-in; }
.sd-toast.bump { animation: sdBump .22s ease; }
@keyframes sdBump { 50% { transform: scale(1.02); } }

/* цветовете са тези на сайта: зелен бутон, червен маркер за отстъпка, оранжев бранд, син */
.sd-success { --sd-a: #2ecc71; --sd-b: #1a9e52; }
.sd-error   { --sd-a: #ee3b32; --sd-b: #c8221b; }
.sd-warning { --sd-a: #e15829; --sd-b: #c44a24; }
.sd-info    { --sd-a: #4a78c4; --sd-b: #354f8c; }

.sd-toast-ico {
    flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
    font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--sd-a), var(--sd-b));
}
.sd-toast-img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(255, 255, 255, .12); }
.sd-toast-body { flex: 1; min-width: 0; }
.sd-toast-title {
    font-family: 'Zaglaviq', Arial, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    color: var(--sd-a); line-height: 1.2; margin-bottom: 2px;
}
.sd-toast-text { font-size: 14px; font-weight: 500; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; word-break: break-word; }
.sd-rich .sd-toast-text { font-family: 'Zaglaviq', Arial, sans-serif; font-size: 15px; font-weight: 400; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; display: block; }
/* бройка в количката — същият оранжев етикет като цената */
.sd-toast-count { flex: none; font-family: 'Zaglaviq', Arial, sans-serif; font-size: 14px; line-height: 1; padding: 4px 8px; border-radius: 6px; color: #fff; background: rgba(255, 255, 255, .16); white-space: nowrap; }
.sd-toast-count.sd-qty { background: #f1582a; }
.sd-toast-count[hidden] { display: none; }
.sd-toast-x {
    flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: rgba(255, 255, 255, .4);
    display: grid; place-items: center; font-size: 12px; cursor: pointer; padding: 0; align-self: flex-start;
}
.sd-toast-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
/* бутон-действие в известието („Върни“ след премахване от количката) */
.sd-toast-act { flex: none; align-self: center; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 138, 92, .55); background: rgba(225, 88, 41, .16); color: #ff9a70; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.sd-toast-act:hover { background: #e15829; color: #fff; }
.sd-toast-act:focus-visible { outline: 2px solid #ff8a5c; outline-offset: 2px; }

html[data-theme="light"] .sd-toast { background: #fff; color: #17181c; border-color: rgba(23, 24, 28, .12); box-shadow: 0 6px 20px rgba(23, 24, 28, .14); }
html[data-theme="light"] .sd-toast-img { border-color: rgba(23, 24, 28, .12); }
html[data-theme="light"] .sd-toast-count { background: #eceef2; color: #17181c; }
html[data-theme="light"] .sd-toast-count.sd-qty { background: #f1582a; color: #fff; }
html[data-theme="light"] .sd-toast-x { color: rgba(23, 24, 28, .4); }
html[data-theme="light"] .sd-toast-x:hover { color: #17181c; background: rgba(23, 24, 28, .07); }
html[data-theme="light"] .sd-toast-act { border-color: rgba(217, 80, 31, .5); background: rgba(217, 80, 31, .09); color: #b8420f; }
html[data-theme="light"] .sd-toast-act:hover { background: #d9501f; color: #fff; }
html[data-theme="light"] .sd-success .sd-toast-title { color: #15803d; }
html[data-theme="light"] .sd-error .sd-toast-title { color: #c8221b; }
html[data-theme="light"] .sd-warning .sd-toast-title { color: #c44a24; }
html[data-theme="light"] .sd-info .sd-toast-title { color: #354f8c; }

@media (max-width: 768px) {
    #sd-toasts { top: calc(env(safe-area-inset-top, 0px) + 8px); left: 10px; right: 10px; width: auto; max-width: none; }
    .sd-toast { min-height: 50px; }
    .sd-toast-text { font-size: 13.5px; }
    .sd-toast-x { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .sd-toast, .sd-toast.hide { transition: opacity .1s; transform: none; } .sd-toast.bump { animation: none; } }
