﻿.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 12px 15px 8px 15px;
    border-radius: 8px;
    color: #fff;
    min-width: 280px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-out;
    overflow:hidden;
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #F44336;
}

.toast-warning {
    background-color: #FF9800;
}

.toast-info {
    background-color: #2196F3;
}

.toast-icon {
    margin-right: 10px;
    flex-shrink: 0;
}

.toast-content {
    flex-grow: 1;
    padding-right: 25px;
}

.toast-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    opacity: 0.9;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    animation-name: shrinkBar;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    animation-duration: var(--duration);
}

@keyframes shrinkBar {
    from {
        width: 100%;
        opacity: 1;
    }

    to {
        width: 0%;
        opacity: 0;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(50%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-exit {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}
