.i3d-neon-standalone {
    font-family: var(--dtc-font-body,inherit);
    display: flex;
    width: 100%;
    justify-content: center;
}

.i3d-neon-full-width-yes .i3d-neon-standalone,
.i3d-neon-full-width-yes .i3d-neon-button {
    width: 100%;
}

.i3d-neon-button {
    --i3d-neon-color: var(--dtc-accent,#ededed);
    --i3d-neon-speed: 1.4s;
    --i3d-neon-line: 2px;
    --i3d-neon-glow: 1;

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 52px;
    padding: 16px 30px;
    overflow: hidden;
    isolation: isolate;

    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    text-decoration: none;

    transition:
        color .28s ease,
        background-color .28s ease,
        border-color .28s ease,
        box-shadow .28s ease,
        transform .28s ease;
    -webkit-tap-highlight-color: transparent;
}

a.i3d-neon-button:hover,
a.i3d-neon-button:focus-visible {
    text-decoration: none;
}

.i3d-neon-button:hover,
.i3d-neon-button:focus-visible {
    border-color: var(--i3d-neon-color);
    transform: translateY(-2px);
    box-shadow:
        0 0 calc(5px * var(--i3d-neon-glow)) var(--i3d-neon-color),
        0 0 calc(18px * var(--i3d-neon-glow)) color-mix(in srgb, var(--i3d-neon-color) 70%, transparent),
        0 0 calc(42px * var(--i3d-neon-glow)) color-mix(in srgb, var(--i3d-neon-color) 44%, transparent),
        0 0 calc(90px * var(--i3d-neon-glow)) color-mix(in srgb, var(--i3d-neon-color) 20%, transparent);
}

.i3d-neon-button:focus-visible {
    outline: 2px solid var(--i3d-neon-color);
    outline-offset: 4px;
}

.i3d-neon-button__content {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.i3d-neon-button__text {
    position: relative;
    z-index: 1;
}

.i3d-neon-button__icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 17px;
    line-height: 1;
    transition: transform .28s ease;
}

.i3d-neon-button__icon i,
.i3d-neon-button__icon svg {
    display: block;
    width: 1em;
    height: 1em;
    font-size: 1em;
    fill: currentColor;
}

.i3d-neon-button:hover .i3d-neon-button__icon:last-child,
.i3d-neon-button:focus-visible .i3d-neon-button__icon:last-child {
    transform: translateX(4px);
}

.i3d-neon-button:hover .i3d-neon-button__icon:first-child,
.i3d-neon-button:focus-visible .i3d-neon-button__icon:first-child {
    transform: translateX(-4px);
}

/*
 * Four independently animated light runners.
 * Names are plugin-scoped to avoid collisions with other widgets/plugins.
 */
.i3d-neon-button__edge {
    position: absolute;
    z-index: 2;
    display: block;
    pointer-events: none;
    filter:
        drop-shadow(0 0 calc(4px * var(--i3d-neon-glow)) var(--i3d-neon-color))
        drop-shadow(0 0 calc(9px * var(--i3d-neon-glow)) var(--i3d-neon-color));
}

.i3d-neon-button__edge--top {
    top: 0;
    left: -100%;
    width: 100%;
    height: var(--i3d-neon-line);
    background: linear-gradient(90deg, transparent, var(--i3d-neon-color));
    animation: i3d-neon-edge-top var(--i3d-neon-speed) linear infinite;
}

.i3d-neon-button__edge--right {
    top: -100%;
    right: 0;
    width: var(--i3d-neon-line);
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--i3d-neon-color));
    animation: i3d-neon-edge-right var(--i3d-neon-speed) linear infinite;
    animation-delay: calc(var(--i3d-neon-speed) * .25);
}

.i3d-neon-button__edge--bottom {
    right: -100%;
    bottom: 0;
    width: 100%;
    height: var(--i3d-neon-line);
    background: linear-gradient(270deg, transparent, var(--i3d-neon-color));
    animation: i3d-neon-edge-bottom var(--i3d-neon-speed) linear infinite;
    animation-delay: calc(var(--i3d-neon-speed) * .5);
}

.i3d-neon-button__edge--left {
    bottom: -100%;
    left: 0;
    width: var(--i3d-neon-line);
    height: 100%;
    background: linear-gradient(0deg, transparent, var(--i3d-neon-color));
    animation: i3d-neon-edge-left var(--i3d-neon-speed) linear infinite;
    animation-delay: calc(var(--i3d-neon-speed) * .75);
}

@keyframes i3d-neon-edge-top {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

@keyframes i3d-neon-edge-right {
    0% { top: -100%; }
    50%, 100% { top: 100%; }
}

@keyframes i3d-neon-edge-bottom {
    0% { right: -100%; }
    50%, 100% { right: 100%; }
}

@keyframes i3d-neon-edge-left {
    0% { bottom: -100%; }
    50%, 100% { bottom: 100%; }
}

@supports not (color: color-mix(in srgb, black 50%, white)) {
    .i3d-neon-button:hover,
    .i3d-neon-button:focus-visible {
        box-shadow:
            0 0 5px var(--i3d-neon-color),
            0 0 18px var(--i3d-neon-color),
            0 0 42px var(--i3d-neon-color);
    }
}

@media (prefers-reduced-motion: reduce) {
    .i3d-neon-button__edge {
        animation: none !important;
        opacity: .8;
    }

    .i3d-neon-button,
    .i3d-neon-button__icon {
        transition-duration: .01ms !important;
    }
}
