:root {
    --notify-primary-color: var(--primary-color, #c1ae8e);
    --notify-primary-hover: var(--primary-hover, #aa956f);
    --notify-primary-light: var(--primary-light, #e8ddcc);
    --notify-bg-color: var(--bg-color, #f2ebe3);
    --notify-surface-color: var(--surface-color, #fffdf9);
    --notify-surface-secondary: var(--surface-secondary, #e8ded2);
    --notify-dark-color: var(--dark-color, #171614);
    --notify-text-primary: var(--text-primary, #25221f);
    --notify-text-secondary: var(--text-secondary, #6f675e);
    --notify-border-color: var(--border-color, #d8cec1);
    --notify-white: var(--white, #ffffff);
    --notify-success-color: var(--success-color, #58745c);
    --notify-warning-color: var(--warning-color, #b8894a);
    --notify-danger-color: var(--danger-color, #a65d55);
    --notify-info-color: var(--info-color, #657785);
}

#global-notify-container,
#global-center-notify-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

#global-notify-container {
    z-index: 9998;
}

#global-center-notify-container {
    z-index: 9999;
}

.notify-stack {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: min(420px, calc(100% - 32px));
}

.notify-stack[data-position="top-right"] {
    top: 16px;
    right: 16px;
}

.notify-stack[data-position="top-left"] {
    top: 16px;
    left: 16px;
}

.notify-stack[data-position="bottom-right"] {
    right: 16px;
    bottom: 16px;
}

.notify-stack[data-position="bottom-left"] {
    left: 16px;
    bottom: 16px;
}

.notify-stack[data-position="top-center"] {
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.notify-stack[data-position="bottom-center"] {
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.lf-notify {
    border-radius: 14px;
    border: 1px solid var(--notify-border-color);
    background: var(--notify-surface-color);
    color: var(--notify-text-primary);
    box-shadow: 0 10px 24px rgba(23, 22, 20, 0.14);
    overflow: hidden;
    pointer-events: auto;
    will-change: transform, opacity;
}

.lf-notify--toast {
    width: 100%;
}

.lf-notify--center {
    width: min(460px, calc(100% - 32px));
    position: relative;
}

.lf-notify__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 12px 14px 10px;
    align-items: start;
}

.lf-notify__icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.lf-notify__icon svg {
    width: 14px;
    height: 14px;
}

.lf-notify__content {
    min-width: 0;
}

.lf-notify__title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.25;
    font-weight: 700;
}

.lf-notify__message {
    margin: 4px 0 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--notify-text-secondary);
}

.lf-notify__close {
    border: 0;
    background: transparent;
    color: var(--notify-text-secondary);
    width: 24px;
    height: 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: grid;
    place-items: center;
}

.lf-notify__close:hover {
    background: var(--notify-primary-light);
    color: var(--notify-text-primary);
}

.lf-notify__progress {
    height: 3px;
    background: rgba(193, 174, 142, 0.2);
}

.lf-notify__progress > span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    animation-name: lf-notify-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    background: var(--notify-primary-color);
}

.lf-notify--success .lf-notify__icon {
    background: rgba(88, 116, 92, 0.16);
    color: var(--notify-success-color);
}

.lf-notify--warning .lf-notify__icon {
    background: rgba(184, 137, 74, 0.2);
    color: var(--notify-warning-color);
}

.lf-notify--error .lf-notify__icon {
    background: rgba(166, 93, 85, 0.17);
    color: var(--notify-danger-color);
}

.lf-notify--info .lf-notify__icon {
    background: rgba(101, 119, 133, 0.18);
    color: var(--notify-info-color);
}

.lf-notify--success .lf-notify__progress > span {
    background: var(--notify-success-color);
}

.lf-notify--warning .lf-notify__progress > span {
    background: var(--notify-warning-color);
}

.lf-notify--error .lf-notify__progress > span {
    background: var(--notify-danger-color);
}

.lf-notify--info .lf-notify__progress > span {
    background: var(--notify-info-color);
}

.lf-notify-enter {
    animation-duration: 220ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

.lf-notify-enter.from-right {
    animation-name: lf-notify-in-right;
}

.lf-notify-enter.from-left {
    animation-name: lf-notify-in-left;
}

.lf-notify-enter.from-top {
    animation-name: lf-notify-in-top;
}

.lf-notify-enter.from-bottom {
    animation-name: lf-notify-in-bottom;
}

.lf-notify-exit {
    animation-duration: 180ms;
    animation-timing-function: ease;
    animation-fill-mode: both;
}

.lf-notify-exit.to-right {
    animation-name: lf-notify-out-right;
}

.lf-notify-exit.to-left {
    animation-name: lf-notify-out-left;
}

.lf-notify-exit.to-top {
    animation-name: lf-notify-out-top;
}

.lf-notify-exit.to-bottom {
    animation-name: lf-notify-out-bottom;
}

.lf-center-overlay {
    position: absolute;
    inset: 0;
    background: rgba(23, 22, 20, 0.42);
    pointer-events: auto;
    animation: lf-center-overlay-in 220ms ease both;
}

.lf-center-overlay.closing {
    animation: lf-center-overlay-out 180ms ease both;
}

.lf-center-wrap {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    pointer-events: none;
}

.lf-center-wrap .lf-notify {
    pointer-events: auto;
}

.lf-notify--center .lf-notify__inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    padding: 18px 18px 10px;
    gap: 8px;
}

.lf-notify--center .lf-notify__icon {
    width: 54px;
    height: 54px;
}

.lf-notify--center .lf-notify__icon svg {
    width: 24px;
    height: 24px;
}

.lf-notify--center .lf-notify__title {
    font-size: 1.08rem;
}

.lf-notify--center .lf-notify__message {
    font-size: 0.94rem;
    margin-top: 2px;
}

.lf-notify__center-meta {
    font-size: 0.82rem;
    color: var(--notify-text-secondary);
    margin-top: 4px;
}

.lf-notify--center .lf-notify__close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.lf-notify--center-enter {
    animation: lf-center-notify-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lf-notify--center-exit {
    animation: lf-center-notify-out 200ms ease both;
}

@keyframes lf-notify-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@keyframes lf-notify-in-right {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lf-notify-out-right {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(18px);
    }
}

@keyframes lf-notify-in-left {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lf-notify-out-left {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-18px);
    }
}

@keyframes lf-notify-in-top {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lf-notify-out-top {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-14px);
    }
}

@keyframes lf-notify-in-bottom {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lf-notify-out-bottom {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(14px);
    }
}

@keyframes lf-center-overlay-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lf-center-overlay-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes lf-center-notify-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lf-center-notify-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.96);
    }
}

@media (max-width: 640px) {
    .notify-stack {
        width: calc(100% - 32px);
    }

    .lf-notify--center {
        width: calc(100% - 32px);
    }
}
