/*!
 * Flow V2 Sovereign Router — CSS Lockdown Layer (Nuclear Refactor)
 * ────────────────────────────────────────────────────────────────────
 * Version: v68.103-S6.4
 * Pairing: v2-tokens.css (tokens + universal helpers)
 *          v2-router.js  (Global Event Delegate)
 *
 * PURPOSE
 *   Last-loaded CSS file that kills WordPress/Elementor button styling
 *   leaks at the source. Loaded with priority 999 in v2-loader.php so
 *   it wins the cascade against any theme/page-builder CSS.
 *
 * SCOPE — what THIS file does:
 *   1. Universal tap-highlight + focus-ring + browser appearance reset
 *      on EVERY interactive element under body.flow-v2-page.
 *   2. Strict "no background" lockdown on [data-action="navigate-back"]
 *      buttons across ALL states (hover/focus/active/focus-visible).
 *   3. Branded color LOCKDOWN on primary CTAs so Elementor's high-
 *      specificity rules cannot override our green/blue identity.
 *
 * SCOPE — what THIS file does NOT do:
 *   • Does NOT define base button geometry (height, padding, font-size).
 *     Those live in stage-specific <style> blocks injected by v2-stage-*.js.
 *   • Does NOT define layout (flex, gap, position). Stage CSS owns layout.
 *   • Does NOT touch desktop. All rules scoped to body.flow-v2-page which
 *     is mobile-only.
 *
 * WHY THIS IS THE LAST LAYER
 *   Elementor's frontend.css ships with `.elementor-button` and global
 *   button selectors that use `!important` and rgba red tap-highlight on
 *   some plans. We cannot remove that CSS (theme-owned). We can only
 *   ensure OUR rules load AFTER it and win specificity battles. The
 *   FLOW_V2_ASSET_VERSION cache-buster guarantees freshness.
 * ──────────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════════
   TIER 1 — Universal interactive element reset
   ═══════════════════════════════════════════════════════════════════
   Applied to EVERY <button>, <a>, [role="button"] under V2.
   Kills only the LEAK SURFACES (tap-highlight, focus ring, browser
   chrome) — does NOT touch background/color, which remain stage-owned. */
body.flow-v2-page button,
body.flow-v2-page a,
body.flow-v2-page [role="button"],
body.flow-v2-page input,
body.flow-v2-page textarea,
body.flow-v2-page select {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    outline: none !important;
}

body.flow-v2-page button,
body.flow-v2-page a,
body.flow-v2-page [role="button"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    -webkit-touch-callout: none !important;
    touch-action: manipulation !important;
}

/* Belt-and-suspenders on focus-visible — kill any blue/red focus ring
   that Elementor or WP-Core might paint via :focus-visible pseudo. */
body.flow-v2-page button:focus,
body.flow-v2-page button:focus-visible,
body.flow-v2-page a:focus,
body.flow-v2-page a:focus-visible,
body.flow-v2-page [role="button"]:focus,
body.flow-v2-page [role="button"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   TIER 2 — Back-button lockdown (no background, no border, NEVER)
   ═══════════════════════════════════════════════════════════════════
   Targets ANY element declared as a back navigator via data-action.
   Catches every Voltar/Retornar regardless of stage. NEVER paints
   background — kills the "red flash" + any Elementor button bg leak. */
body.flow-v2-page [data-action="navigate-back"],
body.flow-v2-page [data-action="navigate-back"]:hover,
body.flow-v2-page [data-action="navigate-back"]:focus,
body.flow-v2-page [data-action="navigate-back"]:active,
body.flow-v2-page [data-action="navigate-back"]:focus-visible,
body.flow-v2-page [data-action="navigate-back"]:focus-within {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Legacy back-button class pattern — kept until S6.4 refactor migrates
   all three Voltars to data-action. Prevents regression during cutover. */
body.flow-v2-page [class*="-back"],
body.flow-v2-page [class*="-back"]:hover,
body.flow-v2-page [class*="-back"]:focus,
body.flow-v2-page [class*="-back"]:active,
body.flow-v2-page [class*="-back"]:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   TIER 3 — Brand CTA lockdown
   ═══════════════════════════════════════════════════════════════════
   Primary CTAs MUST keep their brand colors against Elementor override.
   Each entry locks the default + every interactive state. The :active
   darker-shade rule is the ONLY allowed color shift on these buttons. */

/* Stage 1A — Continuar (email-gate green) */
body.flow-v2-page .fc-v2-sov-1a-cta,
body.flow-v2-page .fc-v2-sov-1a-cta:hover,
body.flow-v2-page .fc-v2-sov-1a-cta:focus,
body.flow-v2-page .fc-v2-sov-1a-cta:focus-visible {
    background: #5caa6a !important;
    background-color: #5caa6a !important;
    color: #ffffff !important;
    border: none !important;
}
body.flow-v2-page .fc-v2-sov-1a-cta:active {
    background: #4e9a5c !important;
    background-color: #4e9a5c !important;
}

/* Stage 1B — Cartão de Crédito ou Pix (green) */
body.flow-v2-page .fc-v2-sov-1b-cta-green,
body.flow-v2-page .fc-v2-sov-1b-cta-green:hover,
body.flow-v2-page .fc-v2-sov-1b-cta-green:focus,
body.flow-v2-page .fc-v2-sov-1b-cta-green:focus-visible {
    background: #5caa6a !important;
    background-color: #5caa6a !important;
    color: #ffffff !important;
    border: none !important;
}
body.flow-v2-page .fc-v2-sov-1b-cta-green:active {
    background: #4e9a5c !important;
    background-color: #4e9a5c !important;
}

/* Stage 1B — Mercado Pago (blue) */
body.flow-v2-page .fc-v2-sov-1b-cta-mp,
body.flow-v2-page .fc-v2-sov-1b-cta-mp:hover,
body.flow-v2-page .fc-v2-sov-1b-cta-mp:focus,
body.flow-v2-page .fc-v2-sov-1b-cta-mp:focus-visible {
    background: #009EE3 !important;
    background-color: #009EE3 !important;
    color: #ffffff !important;
    border: none !important;
}
body.flow-v2-page .fc-v2-sov-1b-cta-mp:active {
    background: #0086c7 !important;
    background-color: #0086c7 !important;
}

/* CEP stage — Confirmar (green-on-valid CTA) */
body.flow-v2-page .fc-v2-sov-cep-confirm,
body.flow-v2-page .fc-v2-sov-cep-confirm:hover,
body.flow-v2-page .fc-v2-sov-cep-confirm:focus,
body.flow-v2-page .fc-v2-sov-cep-confirm:focus-visible {
    background: #111111 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
    border: none !important;
}
body.flow-v2-page .fc-v2-sov-cep-confirm:active {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* Entrega stage — Continuar para Pagamento (green) */
body.flow-v2-page .fc-v2-sov-entrega-cta,
body.flow-v2-page .fc-v2-sov-entrega-cta:hover,
body.flow-v2-page .fc-v2-sov-entrega-cta:focus,
body.flow-v2-page .fc-v2-sov-entrega-cta:focus-visible {
    background: #5caa6a !important;
    background-color: #5caa6a !important;
    color: #ffffff !important;
    border: none !important;
}
body.flow-v2-page .fc-v2-sov-entrega-cta:active {
    background: #4e9a5c !important;
    background-color: #4e9a5c !important;
}

/* ═══════════════════════════════════════════════════════════════════
   TIER 4 — Disabled state lockdown
   ═══════════════════════════════════════════════════════════════════
   When [disabled] is set (during liquid-fill animation), buttons
   must keep their brand color — NOT fade to Elementor's default gray
   disabled state. Cursor flips to default; visual chrome unchanged. */
body.flow-v2-page button:disabled,
body.flow-v2-page button[disabled],
body.flow-v2-page a[aria-disabled="true"] {
    cursor: default !important;
    opacity: 1 !important;
}
