/*
 * CCRS Global CTA Registry & Effects v1.1.6
 * -----------------------------------------
 * ONE master visual source for light DOM + Shadow DOM.
 * JavaScript only registers known CTA elements; CSS owns interaction state.
 *
 * v1.1.1 CASCADE FIX:
 * Some source plugins use ID-scoped :hover rules with !important. In the
 * author-important cascade an ID selector beats an ordinary class selector,
 * even if both declarations are !important. The harmless :not(#nonexistent)
 * selectors below deliberately raise registry specificity without depending
 * on any real page/plugin ID. This makes the registry the final authority for
 * interaction effects while leaving normal geometry/typography untouched.
 */

:root {
    --ccrs-cta-transform: translateY(-5px);
    --ccrs-cta-color: #FFFFFF;

    --ccrs-cta-filled-bg: linear-gradient(90deg,#09EA9F 0%,#0CD6C0 48%,#159EF6 100%);
    --ccrs-cta-filled-border: rgba(255,255,255,.22);
    --ccrs-cta-filled-filter: brightness(1.13) saturate(1.08);
    --ccrs-cta-filled-shadow: 0 16px 34px rgba(0,0,0,.32), 0 0 0 1px rgba(9,234,159,.30), 0 0 28px rgba(9,234,159,.38), 0 0 38px rgba(21,158,246,.16);

    --ccrs-cta-outline-bg: #061B25;
    --ccrs-cta-outline-border: #09EA9F;
    --ccrs-cta-outline-filter: none;
    --ccrs-cta-outline-shadow: 0 16px 34px rgba(0,0,0,.32), 0 0 0 1px rgba(9,234,159,.42), 0 0 28px rgba(9,234,159,.30), inset 0 0 18px rgba(9,234,159,.055);

    --ccrs-cta-arrow-transform: translateX(9px) scale(1.10);
    --ccrs-cta-arrow-transform-abs: translate(9px,-50%) scale(1.10);
    --ccrs-cta-arrow-transform-abs52: translate(9px,-52%) scale(1.10);
    --ccrs-cta-arrow-filter: drop-shadow(0 0 5px rgba(255,255,255,.32));

    --ccrs-cta-transition: transform .20s cubic-bezier(.2,.72,.2,1), filter .20s ease, box-shadow .20s ease, background .20s ease, border-color .20s ease, color .20s ease;
    --ccrs-cta-arrow-transition: transform .20s cubic-bezier(.2,.72,.2,1), filter .20s ease, color .20s ease;
}

/*
 * Specificity weights. These IDs intentionally do not exist. :not() still
 * contributes the ID's specificity, but because the target does not have the
 * fake ID the selector matches normally.
 */
html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d) {
    transition: var(--ccrs-cta-transition) !important;
    -webkit-tap-highlight-color: transparent;
}

html body .ccrs-cta-registry-arrow:not(#ccrs-cta-arrow-spec-a):not(#ccrs-cta-arrow-spec-b):not(#ccrs-cta-arrow-spec-c):not(#ccrs-cta-arrow-spec-d) {
    transition: var(--ccrs-cta-arrow-transition) !important;
}

/* =========================================================
   POINTER HOVER
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
    html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-filled:hover,
    html body .ccrs-cta-registry-trigger:hover > .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-filled,
    html body .ccrs-cta-registry-trigger:hover .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-filled {
        transform: var(--ccrs-cta-transform) !important;
        translate: none !important;
        rotate: none !important;
        scale: 1 !important;
        transform-origin: center center !important;
        color: var(--ccrs-cta-color) !important;
        opacity: 1 !important;
        background: var(--ccrs-cta-filled-bg) !important;
        background-image: var(--ccrs-cta-filled-bg) !important;
        background-size: 100% 100% !important;
        background-position: 50% 50% !important;
        background-repeat: no-repeat !important;
        border-color: var(--ccrs-cta-filled-border) !important;
        filter: var(--ccrs-cta-filled-filter) !important;
        box-shadow: var(--ccrs-cta-filled-shadow) !important;
    }

    html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-outline:hover,
    html body .ccrs-cta-registry-trigger:hover > .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-outline,
    html body .ccrs-cta-registry-trigger:hover .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-outline {
        transform: var(--ccrs-cta-transform) !important;
        translate: none !important;
        rotate: none !important;
        scale: 1 !important;
        transform-origin: center center !important;
        color: var(--ccrs-cta-color) !important;
        opacity: 1 !important;
        background: var(--ccrs-cta-outline-bg) !important;
        background-image: none !important;
        background-size: 100% 100% !important;
        background-position: 50% 50% !important;
        background-repeat: no-repeat !important;
        border-color: var(--ccrs-cta-outline-border) !important;
        filter: var(--ccrs-cta-outline-filter) !important;
        box-shadow: var(--ccrs-cta-outline-shadow) !important;
    }

    html body .ccrs-cta-registry-target:hover .ccrs-cta-registry-arrow:not(#ccrs-cta-arrow-spec-a):not(#ccrs-cta-arrow-spec-b):not(#ccrs-cta-arrow-spec-c):not(#ccrs-cta-arrow-spec-d),
    html body .ccrs-cta-registry-trigger:hover .ccrs-cta-registry-target .ccrs-cta-registry-arrow:not(#ccrs-cta-arrow-spec-a):not(#ccrs-cta-arrow-spec-b):not(#ccrs-cta-arrow-spec-c):not(#ccrs-cta-arrow-spec-d) {
        transform: var(--ccrs-cta-arrow-transform) !important;
        translate: none !important;
        rotate: none !important;
        scale: 1 !important;
        color: var(--ccrs-cta-color) !important;
        filter: var(--ccrs-cta-arrow-filter) !important;
    }
}

/* =========================================================
   KEYBOARD FOCUS
   ========================================================= */

html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-filled:focus-visible,
html body .ccrs-cta-registry-trigger:focus-visible > .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-filled,
html body .ccrs-cta-registry-trigger:focus-visible .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-filled {
    transform: var(--ccrs-cta-transform) !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    transform-origin: center center !important;
    color: var(--ccrs-cta-color) !important;
    opacity: 1 !important;
    background: var(--ccrs-cta-filled-bg) !important;
    background-image: var(--ccrs-cta-filled-bg) !important;
    background-size: 100% 100% !important;
    background-position: 50% 50% !important;
    background-repeat: no-repeat !important;
    border-color: var(--ccrs-cta-filled-border) !important;
    filter: var(--ccrs-cta-filled-filter) !important;
    box-shadow: var(--ccrs-cta-filled-shadow) !important;
}

html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-outline:focus-visible,
html body .ccrs-cta-registry-trigger:focus-visible > .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-outline,
html body .ccrs-cta-registry-trigger:focus-visible .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d).ccrs-cta-registry-outline {
    transform: var(--ccrs-cta-transform) !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    transform-origin: center center !important;
    color: var(--ccrs-cta-color) !important;
    opacity: 1 !important;
    background: var(--ccrs-cta-outline-bg) !important;
    background-image: none !important;
    background-size: 100% 100% !important;
    background-position: 50% 50% !important;
    background-repeat: no-repeat !important;
    border-color: var(--ccrs-cta-outline-border) !important;
    filter: var(--ccrs-cta-outline-filter) !important;
    box-shadow: var(--ccrs-cta-outline-shadow) !important;
}

html body .ccrs-cta-registry-target:focus-visible .ccrs-cta-registry-arrow:not(#ccrs-cta-arrow-spec-a):not(#ccrs-cta-arrow-spec-b):not(#ccrs-cta-arrow-spec-c):not(#ccrs-cta-arrow-spec-d),
html body .ccrs-cta-registry-trigger:focus-visible .ccrs-cta-registry-target .ccrs-cta-registry-arrow:not(#ccrs-cta-arrow-spec-a):not(#ccrs-cta-arrow-spec-b):not(#ccrs-cta-arrow-spec-c):not(#ccrs-cta-arrow-spec-d) {
    transform: var(--ccrs-cta-arrow-transform) !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    color: var(--ccrs-cta-color) !important;
    filter: var(--ccrs-cta-arrow-filter) !important;
}

/* Disabled controls never animate. */
html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d):is(:disabled,[aria-disabled="true"],.disabled),
html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d):is(:disabled,[aria-disabled="true"],.disabled):hover,
html body .ccrs-cta-registry-target:not(#ccrs-cta-spec-a):not(#ccrs-cta-spec-b):not(#ccrs-cta-spec-c):not(#ccrs-cta-spec-d):is(:disabled,[aria-disabled="true"],.disabled):focus-visible {
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: 1 !important;
    filter: none !important;
    box-shadow: none !important;
}

/* Debug only: ?ccrs_cta_debug=1 */
html body.ccrs-cta-registry-debug .ccrs-cta-registry-filled {
    outline: 2px solid #ff00ff !important;
    outline-offset: 2px !important;
}

html body.ccrs-cta-registry-debug .ccrs-cta-registry-outline {
    outline: 2px solid #ffb000 !important;
    outline-offset: 2px !important;
}

html body.ccrs-cta-registry-debug .ccrs-cta-registry-unregistered {
    outline: 3px dashed #ff2b2b !important;
    outline-offset: 3px !important;
}
