/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    padding: 0.85rem 1.75rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    pointer-events: auto;
    overflow: hidden;
    position: relative;

    /* Animation state */
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.3s ease;
}

.toast.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.2;
    transform: scaleX(1);
    transform-origin: left;
}

.toast.active::before {
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.toast-success {
    background: rgba(236, 253, 245, 0.9);
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #065f46;
}

[data-theme="dark"] .toast-success {
    background: rgba(6, 78, 59, 0.8);
    color: #ecfdf5;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    background: rgba(254, 242, 242, 0.9);
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #991b1b;
}

[data-theme="dark"] .toast-error {
    background: rgba(127, 29, 29, 0.8);
    color: #fef2f2;
}

.toast-error i {
    color: #ef4444;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.4);
    padding: 6px;
    border-radius: 50%;
}

[data-theme="dark"] .toast-icon {
    background: rgba(0, 0, 0, 0.2);
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 600;
}