.panel-toast-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: grid;
    width: min(390px, calc(100vw - 32px));
    gap: 10px;
    pointer-events: none;
}

.panel-toast {
    --toast-accent: #0b74de;
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    align-items: start;
    gap: 11px;
    overflow: hidden;
    min-height: 78px;
    padding: 15px 14px 16px;
    border: 1px solid #d8dee7;
    border-radius: 6px;
    background: #ffffff;
    color: #101828;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    transform: translateX(28px);
    animation: panelToastIn .28s ease forwards;
}

.panel-toast.is-closing {
    pointer-events: none;
    animation: panelToastOut .24s ease forwards;
}

.panel-toast-success { --toast-accent: #079455; }
.panel-toast-error { --toast-accent: #d92d20; }
.panel-toast-warning { --toast-accent: #dc6803; }
.panel-toast-info { --toast-accent: #0b74de; }

.panel-toast-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, var(--toast-accent) 26%, #ffffff);
    border-radius: 50%;
    background: color-mix(in srgb, var(--toast-accent) 9%, #ffffff);
    color: var(--toast-accent);
}

.panel-toast-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.panel-toast-content {
    min-width: 0;
    padding-top: 1px;
}

.panel-toast-title {
    display: block;
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.panel-toast-message {
    display: block;
    color: #667085;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.panel-toast-close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: -3px -4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #667085;
    cursor: pointer;
}

.panel-toast-close:hover {
    background: #f2f4f7;
    color: #101828;
}

.panel-toast-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.panel-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: #e9eef4;
}

.panel-toast-progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--toast-accent);
    transform: scaleX(1);
    transform-origin: left center;
    will-change: transform;
}

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

@keyframes panelToastOut {
    to { opacity: 0; transform: translateX(28px); }
}

@media (max-width: 640px) {
    .panel-toast-area {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .panel-toast {
        grid-template-columns: 38px minmax(0, 1fr) 30px;
        min-height: 74px;
        padding: 13px 12px 15px;
    }

    .panel-toast-icon {
        width: 34px;
        height: 34px;
    }
}
