/* Toast Notifications Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.toast-notification {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #007bff;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

/* Toast Types */
.toast-notification.success {
    border-left-color: #28a745;
}

.toast-notification.error,
.toast-notification.danger {
    border-left-color: #dc3545;
}

.toast-notification.warning {
    border-left-color: #ffc107;
}

.toast-notification.info {
    border-left-color: #17a2b8;
}

/* Toast Content */
.toast-icon {
    width: 24px;
    height: 24px;
    margin-left: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    color: #fff;
}

.toast-notification.success .toast-icon {
    background-color: #28a745;
}

.toast-notification.error .toast-icon,
.toast-notification.danger .toast-icon {
    background-color: #dc3545;
}

.toast-notification.warning .toast-icon {
    background-color: #ffc107;
    color: #212529;
}

.toast-notification.info .toast-icon {
    background-color: #17a2b8;
}

.toast-content {
    flex: 1;
    padding-right: 10px;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Close Button */
.toast-close {
    position: absolute;
    top: 8px;
    left: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background-color: #f0f0f0;
    color: #666;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    transition: width linear;
}

.toast-notification.success .toast-progress {
    background-color: #28a745;
}

.toast-notification.error .toast-progress,
.toast-notification.danger .toast-progress {
    background-color: #dc3545;
}

.toast-notification.warning .toast-progress {
    background-color: #ffc107;
}

.toast-notification.info .toast-progress {
    background-color: #17a2b8;
}

/* RTL Support */
[dir="rtl"] .toast-container {
    right: auto;
    left: 20px;
}

[dir="rtl"] .toast-notification {
    transform: translateX(-400px);
    border-left: none;
    border-right: 4px solid #007bff;
}

[dir="rtl"] .toast-notification.show {
    transform: translateX(0);
}

[dir="rtl"] .toast-notification.hide {
    transform: translateX(-400px);
}

[dir="rtl"] .toast-notification.success {
    border-right-color: #28a745;
}

[dir="rtl"] .toast-notification.error,
[dir="rtl"] .toast-notification.danger {
    border-right-color: #dc3545;
}

[dir="rtl"] .toast-notification.warning {
    border-right-color: #ffc107;
}

[dir="rtl"] .toast-notification.info {
    border-right-color: #17a2b8;
}

[dir="rtl"] .toast-icon {
    margin-left: 0;
    margin-right: 12px;
}

[dir="rtl"] .toast-content {
    padding-right: 0;
    padding-left: 10px;
}

[dir="rtl"] .toast-close {
    left: auto;
    right: 8px;
}

/* Responsive */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    [dir="rtl"] .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast-notification {
        transform: translateY(-100px);
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
    
    .toast-notification.hide {
        transform: translateY(-100px);
    }
    
    [dir="rtl"] .toast-notification {
        transform: translateY(-100px);
    }
    
    [dir="rtl"] .toast-notification.show {
        transform: translateY(0);
    }
    
    [dir="rtl"] .toast-notification.hide {
        transform: translateY(-100px);
    }
}