.tgx-toast-container,
.tgx-toast-container * {
    box-sizing: border-box;
}

.tgx-toast-container {
    color-scheme: light;
    position: fixed;
    z-index: var(--z-tgx-toast, 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: var(--font-family-ui, system-ui, 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: var(--tgx-toast-surface, #fff);
    --tgx-toast-accent: #2f5fce;
    --tgx-toast-color: var(--tgx-toast-ink, #24344c);
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--tgx-toast-line, #dce3ed);
    border-inline-start: 4px solid var(--tgx-toast-accent);
    border-radius: 20px;
    background: var(--tgx-toast-background);
    color: var(--tgx-toast-color);
    box-shadow: 0 12px 36px rgb(5 24 50 / 16%);
    opacity: 0;
    transform: translateY(-.5rem);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: auto;
    font-size: 15px;
    line-height: 1.6;
    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: 16px;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.tgx-toast-dismiss {
    position: relative;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    margin: 8px 8px 8px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: .72;
}

.tgx-toast-dismiss:hover,
.tgx-toast-dismiss:focus-visible {
    background: var(--tgx-toast-hover, #edf2fa);
    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-info { --tgx-toast-accent: #386dec; }
.tgx-toast-success { --tgx-toast-accent: #27936b; }
.tgx-toast-danger { --tgx-toast-accent: #d94b61; }
.tgx-toast-warning { --tgx-toast-accent: #b87a16; }

:root[data-tgx-theme="dark"] .tgx-toast-container {
    --tgx-toast-surface:#18283d;
    --tgx-toast-ink:#eaf2ff;
    --tgx-toast-line:#34465c;
    --tgx-toast-hover:#24364d;
    color-scheme:dark;
}
.tgx-toast-container[data-tgx-toast-position^="top-"]{top:max(16px,env(safe-area-inset-top))}
.tgx-toast-container[data-tgx-toast-position^="bottom-"]{bottom:max(16px,env(safe-area-inset-bottom))}

@media (prefers-reduced-motion: reduce) {
    .tgx-toast {
        transition: none;
    }
}

/* Anchored notices are also available to sites with independent styles. */
.tgx-bubble {
    color-scheme: light;
    position: fixed;
    z-index: var(--z-top, 9999);
    background: #fff;
    border-radius: var(--r-xl, 2rem);
    padding: 1rem 2rem;
    filter: var(--bubble-drop-shadow, drop-shadow(0 -2px 8px rgba(0, 0, 0, 0.06)) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.16)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.10)));

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(var(--enter-x, 0px), var(--enter-y, 10px)) scale(0.98);
    transition: var(--bubble-transition-closed, opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s);
    isolation: isolate;

    --arrow-size: clamp(12px, 2.2vw, 18px);
    --arrow-x: 80px;
    --arrow-y: 60px;
}

.tgx-bubble[data-state="measuring"] {
    transition: none;
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tgx-bubble[data-state="open"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
    transition: var(--bubble-transition-open, opacity 0.15s ease, transform 0.15s ease, visibility 0s);
}

.tgx-bubble__title {
    font-size: clamp(18px, 3.6vw, 28px);
    font-weight: 700;
    color: var(--c-primary-900, var(--brand-graphite));
    margin: 0 0 10px 0;
    line-height: 1.1;
    text-align: center;
}

.tgx-bubble__text {
    font-size: clamp(14px, 3vw, 20px);
    opacity: 0.75;
    margin: 0;
    text-align: center;
    white-space: pre-wrap;
}

.tgx-bubble__actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.tgx-bubble__action {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: clamp(14px, 2.8vw, 18px);
    font-weight: 600;
    color: var(--c-primary-700, #1b66ff);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tgx-bubble__action:hover {
    color: var(--c-primary-800, #1556d6);
}

.tgx-bubble__action:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.tgx-bubble__close {
    display: none;
    position: absolute;
    top: 10px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #9aa3ad;
}

.tgx-bubble__close:hover {
    color: #5f6b77;
}

.tgx-bubble::after {
    content: "";
    position: absolute;
    width: var(--arrow-size);
    height: var(--arrow-size);
    background: inherit;
    transform: rotate(45deg);
    z-index: -1;
    box-shadow: none;
}

.tgx-bubble[data-side="top"] {
    transform-origin: center bottom;
    --enter-y: 10px;
    --enter-x: 0px;
}

.tgx-bubble[data-side="top"]::after {
    left: calc(var(--arrow-x) - (var(--arrow-size) / 2));
    top: calc(100% - (var(--arrow-size) / 2));
}

.tgx-bubble[data-side="bottom"] {
    transform-origin: center top;
    --enter-y: -10px;
    --enter-x: 0px;
}

.tgx-bubble[data-side="bottom"]::after {
    left: calc(var(--arrow-x) - (var(--arrow-size) / 2));
    top: calc(-1 * (var(--arrow-size) / 2));
}

.tgx-bubble[data-side="left"] {
    transform-origin: right center;
    --enter-x: 10px;
    --enter-y: 0px;
}

.tgx-bubble[data-side="left"]::after {
    top: calc(var(--arrow-y) - (var(--arrow-size) / 2));
    left: calc(100% - (var(--arrow-size) / 2));
}

.tgx-bubble[data-side="right"] {
    transform-origin: left center;
    --enter-x: -10px;
    --enter-y: 0px;
}

.tgx-bubble[data-side="right"]::after {
    top: calc(var(--arrow-y) - (var(--arrow-size) / 2));
    left: calc(-1 * (var(--arrow-size) / 2));
}

@media (prefers-reduced-motion: reduce) {
    .tgx-bubble {
        transition: none !important;
    }
}

/* Anchored AJAX errors share the resolved application theme with other system surfaces. */
.tgx-bubble{background:var(--tgx-bubble-surface,#fff);color:var(--tgx-bubble-ink,#24344c)}
.tgx-bubble__title{color:var(--tgx-bubble-ink,var(--c-primary-900,#24344c))}
:root[data-tgx-theme="dark"] .tgx-bubble{
    --tgx-bubble-surface:#18283d;
    --tgx-bubble-ink:#eaf2ff;
    --tgx-bubble-soft:#24364d;
    --tgx-bubble-line:#34465c;
    --tgx-bubble-link:#9bbfff;
    color-scheme:dark;
}
.tgx-bubble__action{color:var(--tgx-bubble-link,#2f5fce)}
.tgx-bubble--error{box-sizing:border-box;max-width:min(420px,calc(100vw - 24px));padding:20px 60px 20px 20px;border:1px solid var(--tgx-bubble-line,#dce3ed);border-inline-start:4px solid #d94b61;border-radius:20px;font-family:var(--font-family-ui,system-ui,sans-serif)}
.tgx-bubble--error .tgx-bubble__title{font-size:18px;font-weight:600;line-height:1.4;text-align:left;margin:0 0 8px;overflow-wrap:anywhere}
.tgx-bubble--error .tgx-bubble__text{font-size:15px;line-height:1.6;text-align:left;opacity:1;overflow-wrap:anywhere}
.tgx-bubble--error .tgx-bubble__close{top:8px;right:8px;width:44px;height:44px;background:var(--tgx-bubble-soft,#edf2fa);color:inherit;font-size:26px;line-height:1}
.tgx-bubble--error .tgx-bubble__close:hover{color:inherit;filter:brightness(1.1)}
.tgx-bubble--error .tgx-bubble__close:focus-visible{outline:2px solid currentColor;outline-offset:2px}

.tgx-bubble__actions[hidden]{display:none}
