/* Toast Notification System */
:root {
    --toast-success: #10b981;
    --toast-error: #ef4444;
    --toast-warning: #f59e0b;
    --toast-info: #3b82f6;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

/* Toast */
.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 100%;
    pointer-events: auto;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--gray-300);
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: slideOut 0.3s ease forwards;
}

/* Toast Types */
.toast.success {
    border-left-color: var(--toast-success);
}

.toast.error {
    border-left-color: var(--toast-error);
}

.toast.warning {
    border-left-color: var(--toast-warning);
}

.toast.info {
    border-left-color: var(--toast-info);
}

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

.toast.success .toast-icon {
    color: var(--toast-success);
}

.toast.error .toast-icon {
    color: var(--toast-error);
}

.toast.warning .toast-icon {
    color: var(--toast-warning);
}

.toast.info .toast-icon {
    color: var(--toast-info);
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.toast-message {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progress 5s linear forwards;
}

.toast.success .toast-progress {
    color: var(--toast-success);
}

.toast.error .toast-progress {
    color: var(--toast-error);
}

.toast.warning .toast-progress {
    color: var(--toast-warning);
}

.toast.info .toast-progress {
    color: var(--toast-info);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    @keyframes slideIn {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}
