

/* =========================================================================
 * Effectory Button Style Variations
 * Loaded via enqueue_block_assets so it works in editor + frontend.
 * ====================================================================== */

.wp-block-button.is-style-effectory-filled .wp-block-button__link,
.wp-block-button.is-style-effectory-outlined .wp-block-button__link,
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link {
    --btn-pad-x: 20px;
    --btn-pad-y: 0;
    --ink: #1a2542;
    --yellow: #FFD857;
    --yellow-hover: #ECC02E;

    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    font-family: Poppins;
    font-size: clamp(0.95rem, 1.15vw, 1.25rem);
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(.2,.7,.2,1);
    isolation: isolate;
    min-height:64px;
}

/* arrow appended via pseudo so editors don't need to type it */
.wp-block-button.is-style-effectory-filled .wp-block-button__link::after,
.wp-block-button.is-style-effectory-outlined .wp-block-button__link::after{
    content: "";
    display: inline-block;
    width: 24px;
    height: 20px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='20' viewBox='0 0 24 20' fill='none'><path d='M23.2547 8.6016L15.4042 0.60804C15.2275 0.418927 15.0155 0.267722 14.7805 0.163325C14.5455 0.0589278 14.2924 0.00344925 14.0361 0.000155225C13.7798 -0.0031388 13.5254 0.0458183 13.2879 0.144144C13.0504 0.24247 12.8347 0.388178 12.6534 0.57269C12.472 0.757201 12.3288 0.976788 12.232 1.21852C12.1353 1.46026 12.0871 1.71925 12.0901 1.98026C12.0932 2.24127 12.1475 2.49902 12.2498 2.73834C12.3522 2.97766 12.5006 3.1937 12.6862 3.37376L17.3267 8.09147L1.89324 8.09147C1.38851 8.09925 0.907026 8.30887 0.552792 8.67506C0.198558 9.04125 0 9.53462 0 10.0486C0 10.5626 0.198558 11.056 0.552792 11.4222C0.907026 11.7884 1.3885 11.998 1.89324 12.0058L17.2839 12.0058L12.6862 16.6942C12.3405 17.0642 12.1506 17.5571 12.1569 18.0678C12.1632 18.5784 12.3653 19.0663 12.7201 19.4273C13.0749 19.7883 13.5542 19.9938 14.0557 19.9999C14.5572 20.006 15.0412 19.8122 15.4043 19.4599L23.2547 11.4661C23.4338 11.2848 23.5757 11.0692 23.6723 10.8316C23.7689 10.5941 23.8182 10.3394 23.8173 10.0823C23.8182 10.0662 23.8182 10.05 23.8173 10.0339C23.8182 10.0178 23.8182 10.0017 23.8173 9.98558C23.8174 9.4666 23.615 8.96885 23.2547 8.6018Z' fill='%232C3953'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
    flex-shrink: 0;
}
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 13.6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='14' viewBox='0 0 8 14' fill='none'><path d='M7.61574 5.86738L2.26074 0.414761C2.1402 0.285762 1.99554 0.18262 1.83527 0.111409C1.675 0.0401966 1.50236 0.00235318 1.32751 0.000106243C1.15265 -0.0021407 0.979127 0.0312542 0.817141 0.098325C0.655156 0.165396 0.507986 0.264787 0.384294 0.390647C0.260602 0.516507 0.162889 0.666293 0.096907 0.831186C0.0309251 0.99608 -0.00199219 1.17275 9.32367e-05 1.35079C0.00217866 1.52883 0.0392247 1.70465 0.10905 1.86789C0.178875 2.03114 0.280069 2.17851 0.406673 2.30133C1.48012 3.39263 4.96427 6.85465 4.96427 6.85465C4.96427 6.85465 1.51222 10.2602 0.406716 11.3876C0.170899 11.6399 0.0413164 11.9762 0.0456337 12.3245C0.049951 12.6728 0.187826 13.0056 0.429823 13.2519C0.67182 13.4981 0.998765 13.6383 1.34086 13.6424C1.68295 13.6466 2.01309 13.5144 2.26078 13.2741L7.61574 7.82132C7.73789 7.69769 7.83472 7.55059 7.9006 7.38855C7.96648 7.22652 8.00011 7.05277 7.99952 6.8774C8.00016 6.86642 8.00016 6.8554 7.99952 6.84442C8.00016 6.83343 8.00016 6.82242 7.99952 6.81143C7.99958 6.45742 7.86153 6.11776 7.61574 5.86738Z' fill='%23808898'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
    flex-shrink: 0;
}
.wp-block-button.is-style-effectory-filled .wp-block-button__link:hover::after,
.wp-block-button.is-style-effectory-outlined .wp-block-button__link:hover::after,
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link:hover::after {
    transform: translateX(6px);
}

/* ---------- filled (yellow) ---------- */
.wp-block-button.is-style-effectory-filled .wp-block-button__link {
    background-color: var(--yellow);
    color: var(--wp--preset--color--dark);
    border: none;
    /*box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);*/
}
.wp-block-button.is-style-effectory-filled .wp-block-button__link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--yellow-hover);
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
    z-index: -1;
}
.wp-block-button.is-style-effectory-filled .wp-block-button__link:hover::before {
    transform: scaleX(1);
}

/* ---------- outlined (fills on hover, text/arrow invert) ---------- */
.wp-block-button.is-style-effectory-outlined .wp-block-button__link {
    background-color: transparent;
    color: var(--wp--preset--color--dark);
    border: 2px solid var(--wp--preset--color--dark);
    /*//padding: calc(var(--btn-pad-y) - 2px) calc(var(--btn-pad-x) - 2px);*/
}
.wp-block-button.is-style-effectory-outlined .wp-block-button__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--wp--preset--color--dark);
    border-radius: inherit;
    opacity: 0;
    transform: translateX(-101%);
    transition: transform 0.45s cubic-bezier(.7, 0, .3, 1), opacity 0.45s ease;
    z-index: -1;
}
.wp-block-button.is-style-effectory-outlined .wp-block-button__link:hover {
    color: #fff;
}
.wp-block-button.is-style-effectory-outlined .wp-block-button__link:hover::before {
    opacity: 1;
    transform: translateX(0);
}
/* Arrow as a mask so its colour can transition: it turns white only once
   the sliding fill has (nearly) reached it on the right. On mouse-out it
   turns dark right away, since the fill retreats from that side first. */
.wp-block-button.is-style-effectory-outlined .wp-block-button__link::after {
    background-image: none;
    background-color: var(--wp--preset--color--dark);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='20' viewBox='0 0 24 20' fill='none'><path d='M23.2547 8.6016L15.4042 0.60804C15.2275 0.418927 15.0155 0.267722 14.7805 0.163325C14.5455 0.0589278 14.2924 0.00344925 14.0361 0.000155225C13.7798 -0.0031388 13.5254 0.0458183 13.2879 0.144144C13.0504 0.24247 12.8347 0.388178 12.6534 0.57269C12.472 0.757201 12.3288 0.976788 12.232 1.21852C12.1353 1.46026 12.0871 1.71925 12.0901 1.98026C12.0932 2.24127 12.1475 2.49902 12.2498 2.73834C12.3522 2.97766 12.5006 3.1937 12.6862 3.37376L17.3267 8.09147L1.89324 8.09147C1.38851 8.09925 0.907026 8.30887 0.552792 8.67506C0.198558 9.04125 0 9.53462 0 10.0486C0 10.5626 0.198558 11.056 0.552792 11.4222C0.907026 11.7884 1.3885 11.998 1.89324 12.0058L17.2839 12.0058L12.6862 16.6942C12.3405 17.0642 12.1506 17.5571 12.1569 18.0678C12.1632 18.5784 12.3653 19.0663 12.7201 19.4273C13.0749 19.7883 13.5542 19.9938 14.0557 19.9999C14.5572 20.006 15.0412 19.8122 15.4043 19.4599L23.2547 11.4661C23.4338 11.2848 23.5757 11.0692 23.6723 10.8316C23.7689 10.5941 23.8182 10.3394 23.8173 10.0823C23.8182 10.0662 23.8182 10.05 23.8173 10.0339C23.8182 10.0178 23.8182 10.0017 23.8173 9.98558C23.8174 9.4666 23.615 8.96885 23.2547 8.6018Z' fill='%23000'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='20' viewBox='0 0 24 20' fill='none'><path d='M23.2547 8.6016L15.4042 0.60804C15.2275 0.418927 15.0155 0.267722 14.7805 0.163325C14.5455 0.0589278 14.2924 0.00344925 14.0361 0.000155225C13.7798 -0.0031388 13.5254 0.0458183 13.2879 0.144144C13.0504 0.24247 12.8347 0.388178 12.6534 0.57269C12.472 0.757201 12.3288 0.976788 12.232 1.21852C12.1353 1.46026 12.0871 1.71925 12.0901 1.98026C12.0932 2.24127 12.1475 2.49902 12.2498 2.73834C12.3522 2.97766 12.5006 3.1937 12.6862 3.37376L17.3267 8.09147L1.89324 8.09147C1.38851 8.09925 0.907026 8.30887 0.552792 8.67506C0.198558 9.04125 0 9.53462 0 10.0486C0 10.5626 0.198558 11.056 0.552792 11.4222C0.907026 11.7884 1.3885 11.998 1.89324 12.0058L17.2839 12.0058L12.6862 16.6942C12.3405 17.0642 12.1506 17.5571 12.1569 18.0678C12.1632 18.5784 12.3653 19.0663 12.7201 19.4273C13.0749 19.7883 13.5542 19.9938 14.0557 19.9999C14.5572 20.006 15.0412 19.8122 15.4043 19.4599L23.2547 11.4661C23.4338 11.2848 23.5757 11.0692 23.6723 10.8316C23.7689 10.5941 23.8182 10.3394 23.8173 10.0823C23.8182 10.0662 23.8182 10.05 23.8173 10.0339C23.8182 10.0178 23.8182 10.0017 23.8173 9.98558C23.8174 9.4666 23.615 8.96885 23.2547 8.6018Z' fill='%23000'/></svg>") center / contain no-repeat;
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1), background-color 0.1s ease;
}
.wp-block-button.is-style-effectory-outlined .wp-block-button__link:hover::after {
    background-color: #fff;
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1), background-color 0.15s ease 0.3s;
}

/* ---------- subtle outlined (Figma "CTA Level 4"): thin light-gray border,
   muted text, quiet pill sizing — fills with the border color on hover
   using the same sliding pseudo-element animation as effectory-outlined. ---------- */
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link {
    --subtle-border: #D5D7DD;
    --subtle-muted: #808898;

    min-height: auto;
    gap: 0.5rem;
    padding: 8px 16px;
    font-size: clamp(0.95rem, 1.1vw, 1.125rem);
    background-color: transparent;
    color: var(--subtle-muted);
    border: 2px solid var(--subtle-border);
    height: 45px !important;
}

/* Mobile: let the pill grow to fit its text instead of clipping it — the
   fixed 45px height above (tuned for the button's usual one-line label)
   otherwise hides a second line behind overflow: hidden when a longer
   label wraps on a narrow screen. */
@media (max-width: 768px) {
    /* min-width: 0 on both levels — Safari, unlike Chrome, won't let a flex
       item (the button) or the text inside it shrink/wrap below its
       single-line content size otherwise, since the flex/inline-flex default
       of min-width: auto resolves to that content size, not 0. Without it,
       Safari keeps the label on one line and overflow: hidden clips
       whatever doesn't fit, even though height: auto below is in effect. */
    .wp-block-button.is-style-effectory-subtleoutline {
        min-width: 0;
    }

    .wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link {
        height: auto !important;
        min-height: 45px;
        min-width: 0;
        white-space: normal;
        text-align: center;
    }
}
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link::after {
    width: 14px;
    height: 12px;
    background-size: contain;
}
@media (max-width: 900px) {
    .wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link {
        line-height:1.4rem !important;
    }
}
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--subtle-border);
    border-radius: inherit;
    opacity: 0;
    transform: translateX(-101%);
    transition: transform 0.45s cubic-bezier(.7, 0, .3, 1), opacity 0.45s ease;
    z-index: -1;
}
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link:hover {
    /*color: var(--ink);*/
}
.wp-block-button.is-style-effectory-subtleoutline .wp-block-button__link:hover::before {
    opacity: 1;
    transform: translateX(0);
}
