/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.custom-toast {
    background-color: var(--bs-dark);
    color: white;
    border-left: 4px solid var(--bs-success);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    margin-bottom: 10px;
    border-radius: 8px;
    animation: slideInRight 0.3s ease-out;
    overflow: hidden;
}

.custom-toast.hide {
    animation: slideOutRight 0.3s ease-in;
}

.custom-toast .toast-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 16px 8px 16px;
    display: flex;
    align-items: center;
}

.custom-toast .toast-body {
    padding: 8px 16px 12px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-progress {
    height: 3px;
    background-color: var(--bs-success);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: 0 0 4px 4px;
    transition: width linear;
}

/* Icon styling */
.custom-toast .toast-header span {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
}

/* Close button styling */
.custom-toast .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.custom-toast .btn-close-white:hover {
    opacity: 1;
}

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

/* Type-specific styling */
.custom-toast.success {
    border-left-color: #198754;
}

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

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

.custom-toast.info {
    border-left-color: #0dcaf0;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .custom-toast {
        min-width: auto;
        max-width: 100%;
        margin-bottom: 8px;
    }
    
    .custom-toast .toast-header {
        padding: 10px 12px 6px 12px;
    }
    
    .custom-toast .toast-body {
        padding: 6px 12px 10px 12px;
        font-size: 0.85rem;
    }
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .custom-toast {
    background-color: #2d3748;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .custom-toast .toast-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Light theme adjustments */
[data-bs-theme="light"] .custom-toast {
    background-color: #343a40;
    color: white;
}

/* Multiple toast stacking */
.toast-container .custom-toast:not(:last-child) {
    margin-bottom: 10px;
}

/* Accessibility improvements */
.custom-toast:focus-within {
    outline: 2px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
}

/* Hover effects */
.custom-toast:hover {
    transform: translateX(-2px);
    transition: transform 0.2s ease;
}

.custom-toast:hover .toast-progress {
    animation-play-state: paused;
}
