.tgx-toast-container,
.tgx-toast-container * {
    box-sizing: border-box;
}

.tgx-toast-container {
    position: fixed;
    z-index: 2147482600;
    display: flex;
    width: min(calc(100% - 2rem), 420px);
    max-height: calc(100vh - 2rem);
    padding: 0;
    gap: .75rem;
    flex-direction: column;
    overflow: visible;
    pointer-events: none;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tgx-toast-container[data-tgx-toast-position^="top-"] {
    top: 1rem;
}

.tgx-toast-container[data-tgx-toast-position^="bottom-"] {
    bottom: 1rem;
    flex-direction: column-reverse;
}

.tgx-toast-container[data-tgx-toast-position$="-left"] {
    left: 1rem;
}

.tgx-toast-container[data-tgx-toast-position$="-center"] {
    left: 50%;
    transform: translateX(-50%);
}

.tgx-toast-container[data-tgx-toast-position$="-right"] {
    right: 1rem;
}

.tgx-toast {
    --tgx-toast-background: #212529;
    --tgx-toast-color: #fff;
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: .5rem;
    background: var(--tgx-toast-background);
    color: var(--tgx-toast-color);
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / 22%);
    opacity: 0;
    transform: translateY(-.5rem);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: auto;
    font-size: .875rem;
    line-height: 1.45;
    text-align: left;
}

.tgx-toast-container[data-tgx-toast-position^="bottom-"] .tgx-toast {
    transform: translateY(.5rem);
}

.tgx-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tgx-toast.is-hiding {
    opacity: 0;
}

.tgx-toast-content {
    display: flex;
    min-height: 3rem;
    align-items: center;
}

.tgx-toast-body {
    min-width: 0;
    padding: .8rem .9rem;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.tgx-toast-dismiss {
    position: relative;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    margin: 0 .25rem 0 0;
    padding: 0;
    border: 0;
    border-radius: .375rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: .72;
}

.tgx-toast-dismiss:hover,
.tgx-toast-dismiss:focus-visible {
    background: rgb(255 255 255 / 12%);
    opacity: 1;
}

.tgx-toast-dismiss:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

.tgx-toast-dismiss::before,
.tgx-toast-dismiss::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    content: "";
}

.tgx-toast-dismiss::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.tgx-toast-dismiss::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.tgx-toast-primary {
    --tgx-toast-background: #0d6efd;
}

.tgx-toast-success {
    --tgx-toast-background: #198754;
}

.tgx-toast-danger {
    --tgx-toast-background: #b02a37;
}

.tgx-toast-warning {
    --tgx-toast-background: #ffc107;
    --tgx-toast-color: #212529;
    border-color: rgb(0 0 0 / 12%);
}

.tgx-toast-warning .tgx-toast-dismiss:hover,
.tgx-toast-warning .tgx-toast-dismiss:focus-visible {
    background: rgb(0 0 0 / 10%);
}

.tgx-toast-info {
    --tgx-toast-background: #0dcaf0;
    --tgx-toast-color: #052c34;
    border-color: rgb(0 0 0 / 12%);
}

.tgx-toast-info .tgx-toast-dismiss:hover,
.tgx-toast-info .tgx-toast-dismiss:focus-visible {
    background: rgb(0 0 0 / 10%);
}

@media (prefers-reduced-motion: reduce) {
    .tgx-toast {
        transition: none;
    }
}
