/* ═══════════════════════════════════════════════════════════════
   Sellaris Toast System — Premium Notification Engine
   ═══════════════════════════════════════════════════════════════ */

#sellaris-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
    width: 360px;
    max-width: calc(100vw - 2rem);
}

.s-toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.875rem 0.875rem;
    border-radius: 0.875rem;
    border: 1px solid transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.4),
        0 2px 4px -2px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.04) inset;
    position: relative;
    overflow: hidden;
    transform: translateX(calc(100% + 1.5rem));
    opacity: 0;
    transition:
        transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.28s ease;
    will-change: transform, opacity;
    min-height: 56px;
}

.s-toast.s-toast-in {
    transform: translateX(0);
    opacity: 1;
}

.s-toast.s-toast-out {
    transform: translateX(calc(100% + 1.5rem));
    opacity: 0;
    transition:
        transform 0.28s cubic-bezier(0.4, 0, 1, 1),
        opacity 0.22s ease;
}

/* Variants */
.s-toast-success { background: rgba(6, 20, 15, 0.88); border-color: rgba(16, 185, 129, 0.3); }
.s-toast-error   { background: rgba(25, 6, 6, 0.88);  border-color: rgba(239, 68, 68, 0.35); }
.s-toast-warning { background: rgba(20, 15, 3, 0.88); border-color: rgba(245, 158, 11, 0.35); }
.s-toast-info    { background: rgba(6, 12, 26, 0.88); border-color: rgba(99, 102, 241, 0.35); }
.s-toast-loading { background: rgba(8, 12, 22, 0.92); border-color: rgba(148, 163, 184, 0.2); }

/* Icon */
.s-toast-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.05rem;
}
.s-toast-success .s-toast-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.s-toast-error   .s-toast-icon { background: rgba(239, 68, 68, 0.15);  color: #f87171; }
.s-toast-warning .s-toast-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.s-toast-info    .s-toast-icon { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.s-toast-loading .s-toast-icon { background: rgba(148,163,184, 0.1);   color: #94a3b8; }

/* Text */
.s-toast-body  { flex: 1; min-width: 0; }
.s-toast-title {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: #f1f5f9;
    margin-bottom: 0.1rem;
}
.s-toast-msg {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #94a3b8;
    word-break: break-word;
}

/* Close */
.s-toast-close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-top: -0.1rem;
    margin-right: -0.25rem;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.s-toast-close:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }

/* Progress bar */
.s-toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
    transition: transform linear;
    border-radius: 0 0 0.875rem 0.875rem;
}
.s-toast-success .s-toast-progress { background: linear-gradient(90deg, #059669, #34d399); }
.s-toast-error   .s-toast-progress { background: linear-gradient(90deg, #dc2626, #f87171); }
.s-toast-warning .s-toast-progress { background: linear-gradient(90deg, #d97706, #fbbf24); }
.s-toast-info    .s-toast-progress { background: linear-gradient(90deg, #4338ca, #818cf8); }
.s-toast-loading .s-toast-progress { display: none; }

/* Top accent glow */
.s-toast::before {
    content: '';
    position: absolute;
    top: 0; left: 0.75rem; right: 0.75rem;
    height: 1px;
    border-radius: 1px;
    opacity: 0.5;
}
.s-toast-success::before { background: linear-gradient(90deg, transparent, #34d399, transparent); }
.s-toast-error::before   { background: linear-gradient(90deg, transparent, #f87171, transparent); }
.s-toast-warning::before { background: linear-gradient(90deg, transparent, #fbbf24, transparent); }
.s-toast-info::before    { background: linear-gradient(90deg, transparent, #818cf8, transparent); }
.s-toast-loading::before { background: linear-gradient(90deg, transparent, #64748b, transparent); }

/* Loading spinner */
@keyframes s-spin { to { transform: rotate(360deg); } }
.s-spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(148,163,184,0.2);
    border-top-color: #64748b;
    border-radius: 50%;
    animation: s-spin 0.7s linear infinite;
}

/* Shimmer on loading title */
@keyframes s-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.s-toast-loading .s-toast-title {
    background: linear-gradient(90deg, #94a3b8 25%, #e2e8f0 50%, #94a3b8 75%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: s-shimmer 2s linear infinite;
}
