.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
}

.toast-message {
    background-color: #fff;
    color: #212529;
    padding: 15px 45px 15px 20px;
    border-radius: 5px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateX(100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    max-width: 500px;
    border: 1px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-message::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    animation: timer 10s linear forwards;
}

@keyframes timer {
    to {
        width: 0;
    }
}

.toast-message .toast-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

/* Different types of toasts */
.toast-message.success {
    background-color: #d4edda;
    border-left: 5px solid #28a745; /* Green */
}

.toast-message.success::before {
    background-color: #28a745;
}

.toast-message.error {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545; /* Red */
}

.toast-message.error::before {
    background-color: #dc3545;
}

.toast-message.info {
    background-color: #d1ecf1;
    border-left: 5px solid #17a2b8; /* Blue */
}

.toast-message.info::before {
    background-color: #17a2b8;
}

.toast-message.warning {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107; /* Yellow */
}

.toast-message.warning::before {
    background-color: #ffc107;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: #000;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    padding: 5px 10px;
    opacity: 0.5;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.toast-text {
    font-weight: bold;
}

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