/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast-container > * {
    pointer-events: auto;
}

/* Toast Styles */
.toast {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 300px;
    min-width: 250px;
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.toast-header strong {
    color: #333;
    font-weight: 600;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

.toast-body {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.toast-footer {
    text-align: right;
}

.toast-footer .btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.toast-footer .btn:hover {
    background: #0056b3;
}

/* Toast Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Apply animations */
.toast {
    animation: slideInRight 0.3s ease-out;
}

.toast.slide-out {
    animation: slideOutRight 0.3s ease-in;
}

/* Toast Types */
.toast.toast-success {
    border-left: 4px solid #28a745;
}

.toast.toast-error {
    border-left: 4px solid #dc3545;
}

.toast.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast.toast-message {
    border-left: 4px solid #007bff;
}

/* Responsive design */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .toast-header {
        background-color: #4a5568;
        border-bottom-color: #718096;
    }
    
    .toast-header strong {
        color: #e2e8f0;
    }
    
    .toast-body {
        color: #e2e8f0;
    }
    
    .toast-footer {
        background-color: #4a5568;
        border-top-color: #718096;
    }
    
    .toast-close {
        color: #a0aec0;
    }
    
    .toast-close:hover {
        background-color: #718096;
        color: #e2e8f0;
    }
}
