/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    pointer-events: auto;
    border-right: 4px solid;
    animation: toastSlideIn 0.3s ease-out;
    transition: all 0.3s ease;
    min-width: 300px;
}

.toast:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(-4px);
}

.toast.toast-leaving {
    animation: toastSlideOut 0.3s ease-in forwards;
}

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

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

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

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

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

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

/* Toast Types */
.toast-success {
    border-right-color: #28a745;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.1) 100%);
    color: #28a745;
}

.toast-error {
    border-right-color: #dc3545;
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #dc3545;
}

.toast-warning {
    border-right-color: #ffc107;
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
    color: #ffc107;
}

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

.toast-info .toast-icon {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.15) 0%, rgba(23, 162, 184, 0.1) 100%);
    color: #17a2b8;
}

.toast-danger {
    border-right-color: #dc3545;
}

.toast-danger .toast-icon {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #dc3545;
}

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

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: currentColor;
    animation: toastProgress linear forwards;
}

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

/* RTL Support */
[dir="rtl"] .toast-container {
    left: auto;
    right: 20px;
}

[dir="rtl"] .toast {
    border-right: none;
    border-left: 4px solid;
}

[dir="rtl"] .toast:hover {
    transform: translateX(4px);
}

[dir="rtl"] @keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[dir="rtl"] @keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
    }
    
    [dir="rtl"] .toast-container {
        right: 10px;
        left: 10px;
    }
}


