:root {
    --pad: 10px 14px;
    --shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.toasts {
    position: fixed;
    z-index: 9999;
    display: flex;
    gap: 12px;
    pointer-events: none;
}

.toasts.top-left {
    top: 16px;
    left: 16px;
    flex-direction: column;
}

.toasts.top-right {
    top: 16px;
    right: 16px;
    flex-direction: column;
}

.toasts.bottom-left {
    bottom: 16px;
    left: 16px;
    flex-direction: column-reverse;
}

.toasts.bottom-right {
    bottom: 16px;
    right: 16px;
    flex-direction: column-reverse;
}

.toasts.top-center {
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
}

.toasts.bottom-center {
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column-reverse;
}

.toast {
    pointer-events: auto;
    background: #1f2937;
    color: #fff;
    border-radius: 10px;
    padding: var(--pad);
    box-shadow: var(--shadow);
    max-width: 380px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, filter .15s;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast:hover {
    filter: brightness(1.05);
}

.toast.success {
    background: #0f8f6b;
}

.toast.error {
    background: #b62f2f;
}

.toast.warning {
    background: #b85f28;
}

.toast.info {
    background: #ffffff;
    color: #333333;
}

.toast .close {
    background: transparent;
    border: none;
    color: #fff;
    opacity: .7;
    cursor: pointer;
    font-size: 22px;
    margin-left: 10px;
}

.toast.info .close {
    color: #333333;
}

.toast__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.toast__msg {
    margin: 0;
    line-height: 1.35;
    white-space: pre-line;
}