.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1090;
    width: auto;
    max-width: 90vw;
    min-width: 300px;
}

.toast {
    overflow: hidden;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 0.5rem;
}

.toast-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5);
}

.toast-progress-bar {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    width: 100%;
    transform-origin: left;
    animation: toast-progress 5s linear forwards;
}

@keyframes toast-progress {
    to {
        transform: scaleX(0);
    }
}

/* Color variants */
.toast-success {
    background-color: #198754;
    /* Bootstrap success */
    color: white;
}

.toast-warning {
    background-color: #ffc107;
    /* Bootstrap warning */
    color: #000;
}

.toast-danger {
    background-color: #dc3545;
    /* Bootstrap danger */
    color: white;
}

.toast-info {
    background-color: #0dcaf0;
    /* Bootstrap info */
    color: #000;
}

.toast-primary {
    background-color: #0d6efd;
    /* Bootstrap primary */
    color: white;
}

.toast-secondary {
    background-color: #6c757d;
    /* Bootstrap secondary */
    color: white;
}

/* Close button adaptation */
.toast-success .btn-close,
.toast-danger .btn-close,
.toast-primary .btn-close,
.toast-secondary .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}