/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 24rem;
    width: 100%;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.21, 1.02, 0.73, 1),
                opacity 0.35s ease;
    overflow: hidden;
    position: relative;
}

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

.toast.toast-hiding {
    transform: translateX(110%);
    opacity: 0;
}

/* Toast types */
.toast-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.toast-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.toast-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.toast-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Icon */
.toast-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
}

.toast-success .toast-icon { color: #16a34a; }
.toast-error .toast-icon { color: #dc2626; }
.toast-warning .toast-icon { color: #d97706; }
.toast-info .toast-icon { color: #2563eb; }

/* Content */
.toast-content {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Close button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 0.375rem;
    opacity: 0.5;
    transition: opacity 0.15s ease, background-color 0.15s ease;
    color: currentColor;
    line-height: 0;
}

.toast-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.06);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 0.75rem 0.75rem;
    transition: width linear;
}

.toast-success .toast-progress { background: #16a34a; }
.toast-error .toast-progress { background: #dc2626; }
.toast-warning .toast-progress { background: #d97706; }
.toast-info .toast-progress { background: #2563eb; }

/* Pause progress on hover */
.toast:hover .toast-progress {
    animation-play-state: paused !important;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        width: auto;
    }
}
