.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    min-width: 300px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    pointer-events: all;
    position: relative;
    overflow: hidden;
    transform: translateX(calc(100% + 48px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

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

.toast--hiding {
    transform: translateX(calc(100% + 48px));
    opacity: 0;
    transition: transform 0.35s ease-in, opacity 0.3s ease;
}

.toast--success {
    background-color: #ffffff;
    border-left: 4px solid #16a34a;
}

.toast--error {
    background-color: #ffffff;
    border-left: 4px solid #e53e3e;
}

.toast__icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
}

.toast--success .toast__icon {
    color: #16a34a;
}

.toast--error .toast__icon {
    color: #e53e3e;
}

.toast__body {
    flex: 1;
    min-width: 0;
}

.toast__message {
    font-size: 14px;
    font-weight: 500;
    color: #202327;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

.toast__close {
    background: transparent;
    border: none;
    color: #A7AEB4;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    font-size: 13px;
    transition: color 0.2s;
}

.toast__close:hover {
    color: #202327;
}

.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: toastProgress var(--toast-duration, 4000ms) linear forwards;
}

.toast--success .toast__progress {
    background-color: #16a34a;
}

.toast--error .toast__progress {
    background-color: #e53e3e;
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: unset;
        max-width: 100%;
        transform: translateY(calc(100% + 48px));
    }

    .toast--visible {
        transform: translateY(0);
    }

    .toast--hiding {
        transform: translateY(calc(100% + 48px));
    }
}
