/* Toaster Styles */
.toast-container {
    max-width: 400px;
    z-index: 9999;
}

.toast {
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: none;
}

.toast-body {
    font-weight: 500;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.toast-body i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast.show {
    animation: slideInRight 0.3s ease-out;
}

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

@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;
    }
}

/* Toast Type Styles */
.toast.bg-success {
    background-color: #198754 !important;
}

.toast.bg-danger {
    background-color: #dc3545 !important;
}

.toast.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.toast.bg-warning .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.toast.bg-info {
    background-color: #0dcaf0 !important;
}

.toast.bg-primary {
    background-color: #0d6efd !important;
}

.toast.bg-secondary {
    background-color: #6c757d !important;
}

/* Toast with title */
.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.toast-message {
    display: block;
}

/* Clickable toast */
.toast-body[style*="cursor: pointer"]:hover {
    opacity: 0.9;
}

/* Progress bar for toast (optional) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    animation: progressBar linear;
}

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

/* Responsive Design */
@media (max-width: 576px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
        padding: 1rem;
    }
    
    .toast {
        margin-bottom: 0.75rem;
    }
    
    .toast-body {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .toast-body i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .toast-container {
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
    }
    
    .toast-body {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .toast {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .toast {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .toast.show,
    .toast.hiding {
        animation: none;
    }
    
    .toast-progress {
        animation: none;
    }
}

/* Print styles */
@media print {
    .toast-container {
        display: none;
    }
}
