.tool-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 16, 30, 0.88) !important;
    border: 1px solid rgba(80, 130, 220, 0.45) !important;
    border-radius: 0.5rem !important;
    color: #9fc0ff !important;
    font-size: 0.85rem;
    padding: 0.35rem 0.55rem !important;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    -webkit-tap-highlight-color: transparent;

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            background: rgba(80, 130, 220, 0.16) !important;
            border-color: rgba(80, 130, 220, 0.7) !important;
        }
    }

    &:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    &.disabled {
        pointer-events: none;
        opacity: 0.5;
        filter: grayscale(1);
        cursor: not-allowed;
        box-shadow: none;
    }
}

.tb-chevron {
    color: #9fc0ff !important;
    margin-top: 4px;
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(225deg);
}

.tb-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-self: center !important;
    padding: 0.5rem 1.2rem !important;
    max-width: fit-content !important;
    text-align: center !important;
    letter-spacing: 1.3px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: rgba(43, 212, 143, 0.08) !important;
    color: #2bd48f !important;
    border: 1px solid rgba(43, 212, 143, 0.6) ;
    border-radius: 2rem !important;
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.06),
            0 8px 18px rgba(0,0,0,0.35) !important;
    filter: grayscale(0) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: filter 0.1s, transform 0.1s ease !important;
    position: relative !important;
    overflow: hidden !important;

    > span,
    > strong,
    > em,
    > small {
        color: inherit !important;
    }

    &.download-button {
        width: 10rem;
        height: 3.1rem;
        border: solid 1px white;
        border-radius: 0.5rem;
        max-width: unset !important;

        &.ggl {
            background-image: url("/wp-content/uploads/2024/11/Play-Store-Logo.svg") !important;
        }

        &.appl {
            background-image: url("/wp-content/uploads/2024/11/App-Store-Logo.svg") !important;
        }
    }

    &::before {
        display: block !important;
        content: "" !important;
        position: absolute !important;
        inset: 0 !important;
        background: linear-gradient(
                110deg,
                rgba(14, 124, 102, 0) 0%,
                rgba(43, 212, 143, 0.45) 45%,
                rgba(14, 124, 102, 0) 100%
        ) !important;
        pointer-events: none !important;
        opacity: 0 !important;
        transform-origin: center !important;
        transform: scaleX(0) !important;
        transition:
                transform 0.15s ease-out,
                opacity 0.15s ease-out !important;
    }

    @media (hover: hover) and (pointer: fine) {
        &:not(:disabled):hover::before {
            opacity: 1 !important;
            transform: scaleX(1.5) !important;
        }

        &:not(:disabled):hover {
            transform: scale(1.06) !important;
            box-shadow: 0 0 18px rgba(43, 212, 143, 0.35) !important;
            border-color: #2bd48f !important;
        }
    }

    &.button-secondary {
        background: rgba(14, 22, 41, 0.97)
        linear-gradient(
                150deg,
                rgba(60, 90, 160, 0) 25%,
                rgba(80, 130, 220, 0.28) 75%,
                rgba(60, 90, 160, 0) 90%
        ) !important;
        color: #ffffff !important;
        border: 1px solid rgba(80, 130, 220, 0.55) !important;

        &::before {
            display: block !important;
            content: "" !important;
            position: absolute !important;
            inset: 0 !important;
            background: linear-gradient(
                    110deg,
                    rgba(80, 130, 220, 0) 0%,
                    rgba(125, 175, 255, 0.34) 45%,
                    rgba(80, 130, 220, 0) 100%
            ) !important;
            pointer-events: none !important;
            opacity: 0 !important;
            transform-origin: center !important;
            transform: scaleX(0) !important;
            transition:
                    transform 0.15s ease-out,
                    opacity 0.15s ease-out !important;
        }

        @media (hover: hover) and (pointer: fine) {
            &:not(:disabled):hover::before {
                opacity: 1 !important;
                transform: scaleX(1.5) !important;
            }

            &:not(:disabled):hover {
                transform: scale(1.06) !important;
                box-shadow: 0 0 18px rgba(80, 130, 220, 0.28) !important;
                background: rgba(24, 38, 68, 0.98)
                linear-gradient(
                        150deg,
                        rgba(70, 105, 185, 0) 25%,
                        rgba(105, 155, 245, 0.30) 75%,
                        rgba(70, 105, 185, 0) 90%
                ) !important;
                border-color: rgba(125, 175, 255, 0.72) !important;
                color: #ffffff !important;
            }
        }
    }

    &:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    &:focus-visible {
        outline: none;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45),
        0 0 0 3px rgba(198, 156, 109, 0.30);
    }

    &.disabled {
        pointer-events: none;
        opacity: 0.5;
        filter: grayscale(1);
        cursor: not-allowed;
        box-shadow: none;
    }

    &:disabled {
        pointer-events: none;
        opacity: 0.5;
        filter: grayscale(1) !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
        transform: none !important;
    }

    &:disabled::before {
        opacity: 0 !important;
        transform: scaleX(0) !important;
    }

    &.small {
        padding: 0.35rem 1.15rem !important;
        font-size: 0.8rem !important;
        line-height: 20px !important;
        font-weight: 500 !important;
    }

    &.add-record {
        padding: 0.7rem !important;
        padding-top: 0.8rem !important;
        padding-left: 0.75rem !important;
    }

    &.danger {
        background: linear-gradient(180deg, #8b0f0f 0%, #5f0b0b 100%) !important;
        color: #fff2f2 !important;
        border-color: rgba(255, 255, 255, 0.18) !important;

        &::before {
            background: linear-gradient(
                    110deg,
                    rgba(255, 120, 120, 0) 0%,
                    rgba(255, 120, 120, 0.28) 45%,
                    rgba(255, 120, 120, 0) 100%
            ) !important;
        }

        @media (hover: hover) and (pointer: fine) {
            &:not(:disabled):hover {
                background: linear-gradient(180deg, #a51212 0%, #701010 100%) !important;
                border-color: rgba(255, 140, 140, 0.55) !important;
                color: #ffffff !important;
                box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45),
                0 0 22px rgba(200, 40, 40, 0.25) !important;
            }
        }
    }

    &.test {
        background: #ff8c00 !important; // strong orange
    color: #1a1a1a !important;
        border: 1px dashed rgba(0, 0, 0, 0.4) !important;
        box-shadow: none !important;
        position: relative;

    // optional: subtle label feel
    &::after {
        content: 'TEST';
        position: absolute;
        top: -6px;
        right: -6px;
        font-size: 10px;
        background: #000;
        color: #fff;
        padding: 2px 6px;
        border-radius: 3px;
        opacity: 0.8;
    }

        @media (hover: hover) and (pointer: fine) {
            &:not(:disabled):hover {
                background: #ffa733 !important;
                border-color: rgba(0, 0, 0, 0.6) !important;
                color: #000 !important;
            }
        }
    }
}

.tb-link {
    --tb-link-gradient: linear-gradient(
            110deg,
            #1c9f7c 0%,
            #6df2a7 40%,
            #1c9f7c 100%
    );
    --tb-link-underline: linear-gradient(
            90deg,
            transparent,
            #48f2a3,
            #18a873,
            transparent
    );
    background: var(--tb-link-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent !important;
    position: relative;
    display: inline-flex !important;
    border: none !important;
    font-size: clamp(0.9rem, 1vw, 1.1rem) !important;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    padding: 0 0.7rem !important;
    transition: color 0.1s ease-out, transform 0.1s ease-out;
    will-change: transform;

    &::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -1px;
        height: 2px;
        width: 0;
        background: var(--tb-link-underline);
        transform: translateX(-50%);
        border-radius: 0;
        transition: width 0.15s ease-out;
    }

    &.link-blue {
        --tb-link-gradient: linear-gradient(
                110deg,
                #3b82f6 0%,
                #60a5fa 40%,
                #2563eb 100%
        );

        &::after {
            --tb-link-underline: linear-gradient(
                    90deg,
                    transparent,
                    #60a5fa,
                    #2563eb,
                    transparent
            );
        }
    }

    @media (hover: hover) and (pointer: fine) {
        &:hover,
        &:active,
        &:focus-visible {
            transform: scale(1.1);
        }
        &:focus:not(:focus-visible) {
            transform: none;
        }

        &:hover::after,
        &:active::after,
        &:focus-visible::after {
            width: 98%;
        }
        &:focus:not(:focus-visible)::after {
            width: 0;
        }
    }

    &:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    &:focus-visible {
        outline: none;
    }

    &.img-link {
        @media (hover: hover) and (pointer: fine) {
            &:hover,
            &:active,
            &:focus,
            &:focus-visible {
                transform: scale(1.2);
            }
        }

        &::after {
            bottom: -5px;
        }
    }

    &.link-md {
        font-size: clamp(1rem, 0.8vw, 1.2rem) !important;
        font-weight: 700;
        padding: 0 0.4rem;
    }

    &.link-sm {
        font-size: clamp(0.7rem, 0.8vw, 1rem) !important;
        font-weight: 700;
        padding: 0;
    }

    &.disabled {
        pointer-events: none;
        opacity: 0.5;
        cursor: default;
        text-decoration: none;
    }
}

.ct-link-button.info-button {
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: 2.3rem;
    height: 2.3rem;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    background: transparent no-repeat center;
    transition: transform .15s ease;

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            transform: scale(1.08);
        }
    }

    &:active {
        transform: scale(0.96);
    }

    &:focus {
        outline: none;
    }

    &:focus-visible {
        outline: 2px solid rgba(28, 44, 84, 0.55);
        outline-offset: 3px;
        border-radius: 0;
    }

    &:disabled {
        opacity: .45;
        cursor: default;
        animation: none;
    }
}

.tb-disabled-action {
    pointer-events: none;
    opacity: 0.45;
    filter: grayscale(1);
    cursor: not-allowed;
}

.info-icon {
    animation: info-wobble 4.5s ease-in-out infinite;
    transform-origin: 50% 60%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    &:focus,
    &:active{
        animation: none;
    }
}

@keyframes info-wobble{
    0%   { transform: rotate(0deg) translateX(0); }
    2%   { transform: rotate(-6deg) translateX(-1px); }
    4%   { transform: rotate(6deg)  translateX(1px); }
    6%   { transform: rotate(-4deg) translateX(-1px); }
    8%   { transform: rotate(4deg)  translateX(1px); }
    10%  { transform: rotate(0deg) translateX(0); }
    100% { transform: rotate(0deg) translateX(0); }
}

@media (prefers-reduced-motion: reduce){
    .info-icon{
        animation: none !important;
    }
}

.tb-disabled-action {
    pointer-events: none;
    opacity: 0.45;
    filter: grayscale(1);
    cursor: not-allowed;
}

:root { scroll-padding-top: 8rem; }
html { scroll-behavior: smooth; }

#scrollToTopBtn {
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    padding: 0.5rem 0.7rem;
    text-align: center;
    letter-spacing: 1.3px;
    font-family: sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    background: #2bd48f;
    color: #0f1c2e;
    border: none;
    border-radius: 2rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.75);
    filter: grayscale(0);
    transition: filter 0.1s, transform 0.1s ease;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 1000;

    &:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}

@media (hover: hover) and (pointer: fine) {
    #scrollToTopBtn:hover {
        transform: scale(1.1);
    }
}

.remove-mobile-highlight-color {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 767px) {
    :root { scroll-padding-top: 1rem; }
}
