/* Site-wide CSS overrides applied after the original WordPress/Elementor CSS.
 * Loaded via inject-overrides.js as a <link> at the end of <head>.
 *
 * Each rule explains why it exists. */

/* === Elementor button hover — force the standard "ghost" hover everywhere ===
 *
 * Several Elementor elements have per-element CSS overrides that set the
 * hover bg to var(--e-global-color-d43c13a) = #01FFC1A1 (mint with 63%
 * alpha — just a faded version of the default). The rest of the site uses
 * a "ghost button" hover: gray bg, mint text, mint border. The faded-mint
 * variant looks like a slightly-dimmed version of the default state and
 * doesn't read as a hover state at all.
 *
 * These per-element rules have specificity (0,3,1)
 * (.elementor-NNNN + .elementor-element + .elementor-element-XXX + button +
 * :hover), so we win the cascade by matching that specificity AND coming
 * later in source order. Source-order alone (we're a stylesheet at the end
 * of <head>) gives us that.
 *
 * !important is used so this rule wins over any future per-element override
 * Elementor might emit, even on pages we haven't audited.
 *
 * Affected so far:
 *   - Contact form Send button (post 16, element db64298)
 *   - Submission-successful "Back to home" button (post 5961, element 2e32885)
 *   - Likely others on pages we haven't checked yet
 */

.elementor-button:hover,
.elementor-button:focus {
  background-color: rgba(122, 122, 122, 0.43) !important;
  color: var(--e-global-color-astglobalcolor0) !important;
  border-color: var(--e-global-color-astglobalcolor0) !important;
}

/* Default state: a 1px solid border whose color matches the bg (so it's
 * invisible) prevents a 1px layout shift on hover when the border changes
 * color. Skip cookie-consent (cmplz-*) buttons since they have their own
 * styling. */
.elementor-button:not([class*="cmplz"]) {
  border: 1px solid var(--e-global-color-astglobalcolor0);
}

/* === Stop the "Manage consent" tab blinking ===
 *
 * The default Complianz CSS plays mc_slideOut on the pill's default
 * state. Any CSS recalc (variable change, breakpoint shift, parent
 * layout change) re-triggers the keyframe animation, producing a
 * visible blink as the pill slides down again.
 *
 * Fix: disable the DEFAULT-state animation but keep the hover slide-in
 * animation that brings the pill up. The pill rests at its configured
 * --cmplz-manage-consent-offset (-35px = peeking above viewport edge),
 * applied as a plain `bottom:` value (no animation), and animates up on
 * hover. Complianz's show/hide JS continues to toggle visibility via the
 * cmplz-hidden class, which is independent of this rule. */
#cmplz-manage-consent .cmplz-manage-consent {
  animation: none !important;
  bottom: var(--cmplz-manage-consent-offset);
}

/* === Slide-in-from-left animation for injected CTA buttons ===
 *
 * Our injected "Click here and Let's talk →" containers carry the class
 * `orcabay-fade-in-left`. The element starts off-screen-left and invisible;
 * an IntersectionObserver in inject-overrides.js adds the class
 * `orcabay-fade-in-left-active` when the element scrolls into view, which
 * runs the keyframe.
 *
 * We avoid Elementor's `elementor-invisible` + data-settings convention
 * because its JS only registers elements whose data-id is a 7-char hex
 * string; our injected containers use stable string ids like
 * "letstalk-home" that Elementor ignores. */
@keyframes orcabay-fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-200px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* !important on opacity + transform: an Elementor per-element rule with
 * higher specificity (.elementor-NNNNN .elementor-element-XXX) can otherwise
 * set opacity:1 / transform:none on a parent container and prevent the
 * starting state from applying. */
.orcabay-fade-in-left {
  opacity: 0 !important;
  transform: translateX(-200px) !important;
  will-change: opacity, transform;
}

.orcabay-fade-in-left.orcabay-fade-in-left-active {
  animation: orcabay-fade-in-left 2s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* === Remove the divider line above the Let's-talk button on the
 * market-making sub-pages ===
 *
 * Section 512dc75 is the last content section on /market-making-for-token-issuers/
 * and /market-making-for-exchanges/, immediately above the Let's-talk button
 * (the new container we injected to replace the deleted "Talk to our team"
 * section). Section 512dc75's CSS sets a 1px bottom border that originally
 * served to separate it from the now-removed "Talk to our team" header.
 * With that header gone the border just floats above the button. Hide it.
 */
.elementor-element.elementor-element-512dc75 {
  border-bottom-width: 0 !important;
}
