/* Toast Notification System */

/* Container for all toasts - fixed position top-right */
.toast-container {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: calc(100% - 2rem);
    pointer-events: none;
}

/* Individual toast */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

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

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

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

/* Toast content */
.toast-content {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Close button */
.toast-close {
    flex-shrink: 0;
    padding: 0.25rem;
    margin: -0.25rem -0.25rem -0.25rem 0;
    border-radius: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 1rem;
    height: 1rem;
}

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

/* Success toast */
.toast-success {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}

.toast-success .toast-icon {
    color: #22c55e;
}

.toast-success .toast-progress {
    background-color: #22c55e;
}

/* Error toast */
.toast-error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

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

.toast-error .toast-progress {
    background-color: #ef4444;
}

/* Warning toast */
.toast-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-warning .toast-progress {
    background-color: #f59e0b;
}

/* Info toast */
.toast-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-info .toast-progress {
    background-color: #3b82f6;
}

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

    .toast {
        transform: translateY(-100%);
    }

    .toast.toast-visible {
        transform: translateY(0);
    }

    .toast.toast-hiding {
        transform: translateY(-100%);
    }
}
