/* Custom Toast Notification System */
#toast-container {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 48px);
}

.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.dark .toast {
    background: rgba(31, 41, 55, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #1a1a1a;
}

.dark .toast-title {
    color: #f9fafb;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.dark .toast-message {
    color: #9ca3af;
}

.toast-close {
    flex-shrink: 0;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #666;
}

/* Types */
.toast-success .toast-icon { color: #10b981; }
.toast-error .toast-icon { color: #f43f5e; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info .toast-icon { color: #0ea5e9; }

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
}

.dark .toast-progress {
    background: rgba(255, 255, 255, 0.1);
}

.toast-progress-fill {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transition: transform linear;
}

.toast-success .toast-progress-fill { background: #10b981; }
.toast-error .toast-progress-fill { background: #f43f5e; }
.toast-warning .toast-progress-fill { background: #f59e0b; }
.toast-info .toast-progress-fill { background: #0ea5e9; }

/* Animations */
@keyframes toast-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* Responsive */
@media (max-width: 480px) {
    #toast-container {
        bottom: 12px;
        inset-inline-end: 12px;
        inset-inline-start: 12px;
        width: auto;
        max-width: none;
    }
}
