/* Toast notifications (bootstrap-notify): bottom right, icon on the left, soft in/out. Loaded after the main stylesheets. */
.hv-toast {
    --t-c: #3b82f6; --t-bg: #ffffff; --t-fg: #0c0f0d; --t-muted: #56605b; --t-line: rgba(10, 11, 13, .1);
    box-sizing: border-box; display: flex !important; align-items: flex-start; gap: .85rem;
    width: min(23rem, calc(100vw - 2.5rem)); margin: 0 !important; padding: .9rem .85rem .9rem .9rem;
    background: var(--t-bg); color: var(--t-fg); border: 1px solid var(--t-line); border-radius: 16px;
    box-shadow: 0 14px 34px -16px rgba(10, 11, 13, .35); font-size: .95rem; line-height: 1.45;
    overflow: hidden;
    /* the plugin sets `transition: all .5s` inline; this keeps only the smooth slide of the stack */
    transition: bottom .45s cubic-bezier(.16, 1, .3, 1) !important;
}
html[data-theme=dark] .hv-toast { --t-bg: #171a1d; --t-fg: #f1f3f0; --t-muted: #9aa49f; --t-line: rgba(255, 255, 255, .1); box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .7); }
.hv-toast-success { --t-c: #2f9e5b; }
.hv-toast-danger, .hv-toast-error { --t-c: #e5484d; }
.hv-toast-warning { --t-c: #d99a0b; }
.hv-toast-info, .hv-toast-primary { --t-c: #3b82f6; }

.hv-toast-icon { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: color-mix(in srgb, var(--t-c) 15%, transparent); position: relative; animation: hv-ic-pop .55s cubic-bezier(.34, 1.56, .64, 1) .08s both; }
/* a ripple that leaves the icon once when the toast lands */
.hv-toast-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--t-c); opacity: 0; animation: hv-ic-ripple .9s ease-out .2s both; }
.hv-toast-icon svg { position: absolute; inset: 0; width: 100%; height: 100%; padding: .38rem; fill: none; stroke: var(--t-c); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.hv-toast-icon svg > * { display: none; }
.hv-toast-success .hv-ic-check, .hv-toast-danger .hv-ic-x, .hv-toast-error .hv-ic-x, .hv-toast-warning .hv-ic-bang, .hv-toast-info .hv-ic-i, .hv-toast-primary .hv-ic-i { display: block; stroke-dasharray: 30; stroke-dashoffset: 30; animation: hv-ic-draw .5s cubic-bezier(.65, 0, .35, 1) .3s forwards; }
.hv-toast-danger .hv-toast-icon svg, .hv-toast-error .hv-toast-icon svg { animation: hv-ic-shake .45s ease-in-out .75s both; }
.hv-toast-warning .hv-toast-icon svg { animation: hv-ic-wobble .6s ease-in-out .75s both; }
@keyframes hv-ic-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hv-ic-ripple { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes hv-ic-draw { to { stroke-dashoffset: 0; } }
@keyframes hv-ic-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-3px) rotate(-6deg); } 40% { transform: translateX(3px) rotate(6deg); } 60% { transform: translateX(-2px) rotate(-3deg); } 80% { transform: translateX(2px) rotate(3deg); } }
@keyframes hv-ic-wobble { 0%, 100% { transform: none; } 25% { transform: translateY(-3px) scale(1.12); } 55% { transform: translateY(0) scale(.96); } 80% { transform: translateY(-1px) scale(1.03); } }

.hv-toast-body { flex: 1; min-width: 0; padding-top: .3rem; word-break: keep-all; overflow-wrap: anywhere; }
.hv-toast-body > [data-notify=title] { display: block; font-weight: 700; }
.hv-toast-body > [data-notify=title]:empty { display: none; }
.hv-toast-body > [data-notify=message] { display: block; color: var(--t-fg); }
.hv-toast-body > [data-notify=title] + [data-notify=message] { color: var(--t-muted); font-size: .9rem; }
.hv-toast [data-notify=url]:not([style]) { display: none; }

.hv-toast .hv-toast-x { position: relative !important; right: auto !important; top: auto !important; z-index: auto !important; flex: none; width: 1.75rem; height: 1.75rem; margin: .1rem 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--t-muted); opacity: .7; cursor: pointer; transition: opacity .2s, background-color .2s; }
.hv-toast .hv-toast-x::before, .hv-toast .hv-toast-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: .8rem; height: 1.8px; margin: -.9px 0 0 -.4rem; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.hv-toast .hv-toast-x::after { transform: rotate(-45deg); }
.hv-toast .hv-toast-x:hover { opacity: 1; background: rgba(127, 127, 127, .16); }

/* time left: a thin line that runs out; paused while the pointer is over the toast */
.hv-toast::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--t-c); transform-origin: left; opacity: .55; animation: hv-toast-timer var(--t-d, 5s) linear forwards; }
.hv-toast:hover::after { animation-play-state: paused; }

.hv-toast-in { animation: hv-toast-in .55s cubic-bezier(.16, 1, .3, 1) both; }
.hv-toast-out { animation: hv-toast-out .38s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes hv-toast-in { from { opacity: 0; transform: translate3d(32px, 10px, 0) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes hv-toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate3d(28px, 0, 0) scale(.95); } }
@keyframes hv-toast-timer { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .hv-toast-in, .hv-toast-out { animation-duration: .01s; } .hv-toast::after { display: none; } .hv-toast-icon, .hv-toast-icon::before, .hv-toast-icon svg, .hv-toast-icon svg > * { animation: none !important; stroke-dashoffset: 0 !important; } .hv-toast-icon::before { display: none; } }
