/* -------------------------------------------
   StokesNET — notification toast system
---------------------------------------------- */

.sn-toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: calc(100vw - 36px);
    pointer-events: none;
}

.sn-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: max-content;
    min-width: 240px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(26, 25, 25, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: var(--dark-mode-text-color, #fff);
    font-family: 'Rajdhani', -apple-system, sans-serif;
    transform: translateX(420px);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(.32, .72, .35, 1.35), opacity 0.28s ease, box-shadow .3s ease;
    cursor: grab;
    user-select: none;
}

.sn-toast--dragging {
    cursor: grabbing;
    transition: none !important;
}

.sn-toast--in {
    transform: translateX(0);
    opacity: 1;
}

.sn-toast--out {
    transform: translateX(420px);
    opacity: 0;
}

.sn-toast__icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}
.sn-toast__icon svg { width: 100%; height: 100%; }

.sn-toast__body { flex: 1 1 auto; min-width: 0; }

.sn-toast__title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.sn-toast__message {
    font-size: 14.5px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
    word-wrap: break-word;
}

.sn-toast__close {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, color .2s ease;
}
.sn-toast__close svg { width: 13px; height: 13px; }
.sn-toast__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sn-toast--clickable .sn-toast__body { cursor: pointer; }
.sn-toast__action {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* severity accents */
.sn-toast--info    .sn-toast__icon { color: #6fb2ff; }
.sn-toast--success .sn-toast__icon { color: #59d68f; }
.sn-toast--warning .sn-toast__icon { color: #f0b955; }
.sn-toast--error   .sn-toast__icon { color: #f0685f; }

.sn-toast--info {
    border: 1px solid rgba(111, 178, 255, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 14px 0 rgba(111, 178, 255, 0.35);
}
.sn-toast--success {
    border: 1px solid rgba(89, 214, 143, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 14px 0 rgba(89, 214, 143, 0.35);
}
.sn-toast--warning {
    border: 1px solid rgba(240, 185, 85, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 14px 0 rgba(240, 185, 85, 0.35);
}
.sn-toast--error {
    border: 1px solid rgba(240, 104, 95, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 14px 0 rgba(240, 104, 95, 0.35);
}

@media (max-width: 480px) {
    .sn-toast-stack { top: 10px; right: 10px; left: 10px; max-width: none; align-items: stretch; }
    .sn-toast { width: auto; max-width: none; }
}
