﻿.toast-root {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    width: 100%;
    pointer-events: none;
}

/* Frosted Glass Capsule */
.toast-capsule {
    min-width: 280px;
    max-width: 480px;
    /* FIX: Allow JS dynamic color and keep frosted look */
    background-color: inherit;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    border-radius: 3px;
    padding: 14px 22px;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    pointer-events: auto;
    position: relative;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.4s ease;
}

    .toast-capsule.show {
        opacity: 1;
        transform: translateY(0);
    }

    .toast-capsule.hide {
        opacity: 0;
        transform: translateY(-20px);
        /* FIX: Keep dynamic background during fade-out */
        background-color: inherit !important;
    }

/* Top Progress Line */
.toast-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: calc(100% - 44px); /* make width respect horizontal padding (22px left + 22px right) */
    margin-left: 22px; /* align to left padding */
    margin-right: 22px; /* align to right padding */
    background: #993af2;
    border-radius: 50px;
    overflow: hidden;
}

/* Close button */
.toast-close {
    margin-left: 14px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}
