/* Neon Action Button — frontend styles (ported from the original neon button). */

.neon-btn {
    --nab-color: #ffd93b;
    --nab-hover-color: #de2227;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    text-align: center;
    box-sizing: border-box;
    font-size: var(--nab-fs, inherit);
    width: var(--nab-w, auto);
    height: var(--nab-h, auto);
    padding: 0.6em 1.2em;
    color: var(--nab-color);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    overflow: hidden;
    transition: 0.5s;
    background: transparent;
}

/* Button orientation: stack icon above label */
.neon-btn.btn-vertical {
    flex-direction: column;
}
.neon-btn:hover {
    background: var(--nab-hover-bg, var(--nab-color));
    color: var(--nab-hover-color);
    box-shadow:
        0 0 5px var(--nab-color),
        0 0 25px var(--nab-color),
        0 0 50px var(--nab-color),
        0 0 200px var(--nab-color);
}

/* Text orientation: upright vertical letters.
   A flex container + vertical writing-mode centres the text on BOTH axes, so
   with a set width/height the label sits dead-centre (like the screenshots). */
.neon-btn.text-vertical {
    display: inline-flex;
    flex-direction: row;
    align-items: center;       /* centre horizontally (cross axis) */
    justify-content: center;   /* centre vertically (main axis in vertical-rl) */
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
}
.neon-btn.text-vertical .neon-btn__label {
    text-align: center;
}

/* Animated border runners */
.neon-btn span {
    position: absolute;
    display: block;
}
.neon-btn span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--nab-color));
    animation: nab-slide1 1s linear infinite;
}
.neon-btn span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--nab-color));
    animation: nab-slide2 1s linear infinite;
    animation-delay: .25s;
}
.neon-btn span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg, transparent, var(--nab-color));
    animation: nab-slide3 1s linear infinite;
    animation-delay: .5s;
}
.neon-btn span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(360deg, transparent, var(--nab-color));
    animation: nab-slide4 1s linear infinite;
    animation-delay: .75s;
}
@keyframes nab-slide1 { 0% { left: -100%; } 50%,100% { left: 100%; } }
@keyframes nab-slide2 { 0% { top: -100%; } 50%,100% { top: 100%; } }
@keyframes nab-slide3 { 0% { right: -100%; } 50%,100% { right: 100%; } }
@keyframes nab-slide4 { 0% { bottom: -100%; } 50%,100% { bottom: 100%; } }

/* Fixed / floating wrappers (stacked, vertically centred on the edge) */
.neon-btn-fixed-wrap {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.neon-btn-fixed-wrap.side-right { right: 0; align-items: flex-end; }
.neon-btn-fixed-wrap.side-left  { left: 0;  align-items: flex-start; }

/* Popup overlay (ported from the original popup styles, namespaced) */
.nab-popup-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.nab-popup-overlay.is-open { display: flex; }
.nab-popup-content {
    background: #fff;
    padding: 0;
    width: 54%;
    max-width: 92vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    border-radius: 10px;
}
.nab-popup-close {
    position: absolute;
    top: 30px;
    right: 35px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #ffffff;
    z-index: 1;
}
@media (max-width: 600px) {
    .nab-popup-content { width: 92% !important; }
}

/* Icon-only buttons (label hidden) */
.neon-btn.icon-only { padding: 0.7em 0.85em; }
.neon-btn.icon-only i { font-size: 1.15em; }

/* Visually-hidden label kept for screen readers / accessibility */
.nab-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Per-device visibility (breakpoints: mobile <=600, tablet 601-1024, desktop >=1025) */
@media (max-width: 600px) {
    .neon-btn.nab-hide-mobile, .nabx.nab-hide-mobile { display: none !important; }
}
@media (min-width: 601px) and (max-width: 1024px) {
    .neon-btn.nab-hide-tablet, .nabx.nab-hide-tablet { display: none !important; }
}
@media (min-width: 1025px) {
    .neon-btn.nab-hide-desktop, .nabx.nab-hide-desktop { display: none !important; }
}

/* Popup that hugs the form content */
.nab-popup-content.nab-fit {
    width: auto;
    max-width: 92vw;
    min-width: 280px;
}


/* Responsive text sizing (tablet 601-1024, mobile <=600). The button padding
   is em-based, so shrinking the font shrinks the whole button. */
@media (max-width: 1024px) {
    .neon-btn, .nabx {
        font-size: var(--nab-fs-tablet, var(--nab-fs, inherit));
        width: var(--nab-w-tablet, var(--nab-w, auto));
        height: var(--nab-h-tablet, var(--nab-h, auto));
    }
}
@media (max-width: 600px) {
    .neon-btn, .nabx {
        font-size: var(--nab-fs-mobile, var(--nab-fs, inherit));
        width: var(--nab-w-mobile, var(--nab-w, auto));
        height: var(--nab-h-mobile, var(--nab-h, auto));
    }
}

/* Default label spacing (overridable per button) */
.neon-btn__label { margin: 10px; }

/* ==========================================================================
   Animated border styles (imported set). Each uses the button's own colors:
   --nab-color (primary), --nab-color2 (secondary), --nab-fill (inner fill for
   bordered gradient styles). Base class .nabx, per-style .nabx--{key}.
   ========================================================================== */
@property --nab-angle  { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@property --nab-angle2 { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes nab-rot   { to { --nab-angle: 360deg; } }
@keyframes nab-rot2  { to { --nab-angle2: 360deg; } }
@keyframes nab-march { to { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; } }
@keyframes nab-pulse {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 14px 2px color-mix(in srgb, var(--nab-color) 55%, transparent),
                      0 0 26px 6px color-mix(in srgb, var(--nab-color2) 35%, transparent); }
}
@keyframes nab-flicker {
    0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; }
    20%, 22%, 55% { opacity: 0.35; }
}
@keyframes nab-sweep {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}
@keyframes nab-gradslide { to { background-position: 200% 0; } }
@keyframes nab-bracket {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}
@keyframes nab-laser { 0% { top: -20%; } 100% { top: 120%; } }
@keyframes nab-dot {
    0%   { top: -3px; left: -3px; }
    25%  { top: -3px; left: calc(100% - 3px); }
    50%  { top: calc(100% - 3px); left: calc(100% - 3px); }
    75%  { top: calc(100% - 3px); left: -3px; }
    100% { top: -3px; left: -3px; }
}

.nabx {
    --nab-color: #F4C430;
    --nab-color2: #E8342A;
    --nab-fill: #000000;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--nab-color);
    font-size: var(--nab-fs, 14px);
    width: var(--nab-w, auto);
    height: var(--nab-h, auto);
    transition: 0.3s;
}
.nabx__label { position: relative; }
.nabx.btn-vertical { flex-direction: column; }
.nabx.text-vertical { writing-mode: vertical-rl; text-orientation: upright; }
.nabx.icon-only { padding: 14px 16px; }

/* 01 Comet sweep */
.nabx--comet {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--nab-fill), var(--nab-fill)) padding-box,
        conic-gradient(from var(--nab-angle), transparent 0deg, transparent 260deg, var(--nab-color) 300deg, var(--nab-color2) 330deg, transparent 360deg) border-box;
    animation: nab-rot 3.2s linear infinite;
}

/* 02 Marching dashes (CSS marching ants; responsive) */
.nabx--dashes {
    border-radius: 6px;
    background:
        linear-gradient(90deg, var(--nab-color) 50%, transparent 0) repeat-x,
        linear-gradient(90deg, var(--nab-color) 50%, transparent 0) repeat-x,
        linear-gradient(0deg,  var(--nab-color) 50%, transparent 0) repeat-y,
        linear-gradient(0deg,  var(--nab-color) 50%, transparent 0) repeat-y;
    background-size: 14px 2px, 14px 2px, 2px 14px, 2px 14px;
    background-position: 0 0, 0 100%, 0 0, 100% 0;
    animation: nab-march 0.6s linear infinite;
}

/* 03 Pulsing glow */
.nabx--pulse { border: 2px solid var(--nab-color); animation: nab-pulse 2.2s ease-in-out infinite; }

/* 04 Neon flicker */
.nabx--flicker {
    border: 1.5px solid var(--nab-color);
    box-shadow: 0 0 8px color-mix(in srgb, var(--nab-color) 60%, transparent);
    animation: nab-flicker 4s linear infinite;
}
.nabx--flicker .nabx__label { text-shadow: 0 0 6px color-mix(in srgb, var(--nab-color) 80%, transparent); }

/* 05 Sweeping underline */
.nabx--underline {
    flex-direction: column;
    gap: 10px;
    padding: 10px 4px;
    border-radius: 0;
}
.nabx--underline .nabx__line {
    position: relative;
    width: 100%;
    height: 2px;
    background: #2a2a2a;
    overflow: hidden;
}
.nabx--underline .nabx__line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--nab-color), var(--nab-color2), transparent);
    animation: nab-sweep 2.6s ease-in-out infinite;
}

/* 06 Double counter-rotating ring */
.nabx--ring { padding: 0; border-radius: 8px; }
.nabx--ring .nabx__ring1,
.nabx--ring .nabx__ring2 {
    position: absolute;
    border-radius: 8px;
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.nabx--ring .nabx__ring1 {
    inset: 0; padding: 2px;
    background: conic-gradient(from var(--nab-angle), transparent 0deg, transparent 300deg, var(--nab-color) 340deg, transparent 360deg);
    animation: nab-rot 4s linear infinite;
}
.nabx--ring .nabx__ring2 {
    inset: 4px; padding: 2px; border-radius: 6px;
    background: conic-gradient(from var(--nab-angle2), transparent 0deg, transparent 300deg, var(--nab-color2) 340deg, transparent 360deg);
    animation: nab-rot2 3s linear infinite reverse;
}
.nabx--ring .nabx__label { padding: 14px 30px; }

/* 07 Gradient slide */
.nabx--gradslide {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--nab-fill), var(--nab-fill)) padding-box,
        linear-gradient(90deg, var(--nab-color), var(--nab-color2), var(--nab-color), var(--nab-color2)) border-box;
    background-size: 100% 100%, 200% 100%;
    animation: nab-gradslide 2.4s linear infinite;
}

/* 08 Corner brackets */
.nabx--brackets { padding: 16px 34px; border-radius: 0; }
.nabx--brackets .nabx__c { position: absolute; width: 14px; height: 14px; animation: nab-bracket 1.8s ease-in-out infinite; }
.nabx--brackets .nabx__c.tl { top: 0; left: 0;  border-top: 2px solid var(--nab-color); border-left: 2px solid var(--nab-color); }
.nabx--brackets .nabx__c.tr { top: 0; right: 0; border-top: 2px solid var(--nab-color); border-right: 2px solid var(--nab-color); }
.nabx--brackets .nabx__c.bl { bottom: 0; left: 0;  border-bottom: 2px solid var(--nab-color); border-left: 2px solid var(--nab-color); }
.nabx--brackets .nabx__c.br { bottom: 0; right: 0; border-bottom: 2px solid var(--nab-color); border-right: 2px solid var(--nab-color); }

/* 09 Laser scan */
.nabx--laser { overflow: hidden; border: 1px solid var(--nab-color); }
.nabx--laser .nabx__beam {
    position: absolute; left: 0; right: 0; height: 16px;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--nab-color) 55%, transparent), transparent);
    animation: nab-laser 2.2s linear infinite;
    pointer-events: none;
}

/* 10 Traveling dot */
.nabx--dot { border: 1.5px solid #333; }
.nabx--dot .nabx__dot {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: var(--nab-color); box-shadow: 0 0 8px 2px var(--nab-color);
    animation: nab-dot 3.2s linear infinite;
    pointer-events: none;
}


/* Hover text/background for the animated styles.
   Background hover only on styles that don't use background for their border. */
.nabx:hover { color: var(--nab-hover-color); }
.nabx--pulse:hover,
.nabx--flicker:hover,
.nabx--brackets:hover,
.nabx--underline:hover,
.nabx--laser:hover,
.nabx--dot:hover { background: var(--nab-hover-bg, transparent); }

/* ==========================================================================
   Expand / social speed-dial button
   ========================================================================== */
.nab-expand {
    --nab-color: #ffd93b;
    --nab-hover-color: #111111;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.nab-expand--right { flex-direction: row; }
.nab-expand--left  { flex-direction: row-reverse; }
.nab-expand--down  { flex-direction: column; }
.nab-expand--up    { flex-direction: column-reverse; }

.nab-expand__toggle {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    border: 0; border-radius: 50%;
    cursor: pointer;
    background: var(--nab-color);
    color: var(--nab-hover-color);
    font-size: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: background .25s, transform .25s;
}
.nab-expand__toggle:hover { background: var(--nab-hover-bg, var(--nab-color)); transform: translateY(-1px); }
/* Active state: flip the trigger to the accent/hover color. */
.nab-expand.is-open .nab-expand__toggle { background: var(--nab-hover-bg, var(--nab-hover-color)); color: #fff; }

.nab-expand__ico--close { display: none; }
.nab-expand.is-open .nab-expand__ico--open { display: none; }
.nab-expand.is-open .nab-expand__ico--close { display: inline-flex; }

.nab-expand__items { display: flex; gap: 12px; align-items: center; }
.nab-expand--up .nab-expand__items,
.nab-expand--down .nab-expand__items { flex-direction: column; }
.nab-expand:not(.is-open) .nab-expand__items { display: none; }

.nab-expand__item {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--nab-item, #2271b1);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transition: transform .2s, filter .2s;
}
.nab-expand__item:hover { transform: scale(1.08); filter: brightness(1.08); color: #fff; }
.nab-expand.is-open .nab-expand__item { animation: nab-pop .25s ease backwards; }
.nab-expand.is-open .nab-expand__item:nth-child(1) { animation-delay: .00s; }
.nab-expand.is-open .nab-expand__item:nth-child(2) { animation-delay: .05s; }
.nab-expand.is-open .nab-expand__item:nth-child(3) { animation-delay: .10s; }
.nab-expand.is-open .nab-expand__item:nth-child(4) { animation-delay: .15s; }
.nab-expand.is-open .nab-expand__item:nth-child(5) { animation-delay: .20s; }
.nab-expand.is-open .nab-expand__item:nth-child(6) { animation-delay: .25s; }
@keyframes nab-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
