/* Toast Notification System */

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

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    pointer-events: auto;
    animation: slideIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.success::before {
    background: #28a745;
}

.toast.error::before {
    background: #dc3545;
}

.toast.warning::before {
    background: #ffc107;
}

.toast.info::before {
    background: #17a2b8;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.toast.success .toast-icon {
    background: #d4edda;
    color: #28a745;
}

.toast.error .toast-icon {
    background: #f8d7da;
    color: #dc3545;
}

.toast.warning .toast-icon {
    background: #fff3cd;
    color: #856404;
}

.toast.info .toast-icon {
    background: #d1ecf1;
    color: #17a2b8;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin: 0 0 4px 0;
}

.toast-message {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #212529;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progress linear;
}

.toast.success .toast-progress {
    color: #28a745;
}

.toast.error .toast-progress {
    color: #dc3545;
}

.toast.warning .toast-progress {
    color: #ffc107;
}

.toast.info .toast-progress {
    color: #17a2b8;
}

/* 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%;
    }
}

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

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

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

/* Action buttons in toast */
.toast-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.toast-action-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-action-btn.primary {
    background: #28a745;
    color: white;
}

.toast-action-btn.primary:hover {
    background: #218838;
}

.toast-action-btn.secondary {
    background: #e9ecef;
    color: #495057;
}

.toast-action-btn.secondary:hover {
    background: #dee2e6;
}
