/* Toast Notification Container */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 320px;
    max-width: 400px;
}

/* Toast Base Styles */
.toast-notification {
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toast-notification:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.toast-notification.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Toast Header */
.toast-notification .toast-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
    border-bottom: none;
}

.toast-notification .toast-icon {
    font-size: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.toast-notification .toast-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-notification .btn-close {
    padding: 0;
    margin-left: 10px;
    opacity: 0.7;
}

.toast-notification .btn-close:hover {
    opacity: 1;
}

/* Toast Body */
.toast-notification .toast-body {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

/* Toast Type Colors */
.toast-notification.toast-success .toast-header {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.toast-notification.toast-success .toast-icon {
    color: #28a745;
}

.toast-notification.toast-error .toast-header {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.toast-notification.toast-error .toast-icon {
    color: #dc3545;
}

.toast-notification.toast-warning .toast-header {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.toast-notification.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-notification.toast-info .toast-header {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.toast-notification.toast-info .toast-icon {
    color: #17a2b8;
}

/* 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;
    }
}

/* Progress Bar */
.toast-notification .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: currentColor;
    opacity: 0.5;
    transition: width linear;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    #toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }

    .toast-notification {
        margin-bottom: 8px;
    }

    .toast-notification .toast-header {
        padding: 10px 12px;
    }

    .toast-notification .toast-body {
        padding: 10px 12px;
        font-size: 12px;
    }

    .toast-notification .toast-icon {
        font-size: 18px;
        margin-right: 8px;
    }

    .toast-notification .toast-title {
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .toast-notification .toast-body {
        color: #f8f9fa;
        background-color: #343a40;
    }

    .toast-notification.toast-success .toast-header {
        background-color: #1e4620;
        color: #a3cfbb;
    }

    .toast-notification.toast-error .toast-header {
        background-color: #4d1f1f;
        color: #f5b7b1;
    }

    .toast-notification.toast-warning .toast-header {
        background-color: #4d3d1f;
        color: #f9e79f;
    }

    .toast-notification.toast-info .toast-header {
        background-color: #1f3d4d;
        color: #a3d5e5;
    }
}
