/**
 * Shared A&M form submit CTA — navy chevron box, expands on hover.
 * Source of truth: am-holdings theme docs/form-submit-cta-standalone.html.
 * Buttons (Gravity Forms, CF7, [data-am-submit-cta]) are wrapped in
 * .am-submit-cta by assets/js/am-submit-cta.js. Loaded SITE-WIDE by
 * inc/gf-lead-forms.php so CF7 forms get the CTA too.
 */

:root {
    --am-cta-navy: #01244a;
    --am-cta-text: #002b49;
    --am-cta-focus: #fbc40a;
    --am-cta-height: 42px;
    --am-cta-speed: 400ms;
    --am-cta-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.am-submit-cta {
    position: relative;
    z-index: 0;
    display: inline-flex;
    width: fit-content;
    height: var(--am-cta-height);
    overflow: hidden;
    vertical-align: middle;
}

.am-submit-cta::before {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -1;
    width: 45px;
    background: var(--am-cta-navy);
    content: "";
    transition: width var(--am-cta-speed) ease;
}

.am-submit-cta::after {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    content: "";
    pointer-events: none;
    transform: translateY(-50%) rotate(45deg);
}

.am-submit-cta > :is(input[type="submit"], button[type="submit"]) {
    position: relative !important;
    z-index: 1;
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    min-width: 0 !important;
    height: var(--am-cta-height) !important;
    margin: 0 !important;
    padding: 4px 20px 0 60px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--am-cta-text) !important;
    background: transparent !important;
    font-family: var(--am-cta-font) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    cursor: pointer;
    transition: color var(--am-cta-speed) ease !important;
    appearance: none;
}

.am-submit-cta:hover::before,
.am-submit-cta:focus-within::before {
    width: 100%;
}

.am-submit-cta:hover > :is(input[type="submit"], button[type="submit"]),
.am-submit-cta:focus-within > :is(input[type="submit"], button[type="submit"]) {
    color: #fff !important;
}

.am-submit-cta > :is(input[type="submit"], button[type="submit"]):focus-visible {
    outline: 2px solid var(--am-cta-focus) !important;
    outline-offset: -3px;
}

.am-submit-cta:has(> :disabled) {
    opacity: 0.55;
}

.am-submit-cta:has(> :disabled)::before {
    width: 45px;
}

@media (prefers-reduced-motion: reduce) {
    .am-submit-cta::before,
    .am-submit-cta > :is(input[type="submit"], button[type="submit"]) {
        transition-duration: 0.01ms !important;
    }
}

/* CF7 forms (report + careers pages): the old submit was display:block on
   its own row, with an absolutely-positioned arrow sprite (.cta-arrow3)
   inside the preceding paragraph. Give the wrapper its own row and retire
   the old sprite — the CTA has its own chevron. */
.wpcf7-form .am-submit-cta {
    display: flex;
    clear: both;
    margin-top: 8px;
}

/* The old report design pulled the block button up with a -25px paragraph
   margin — undo it for the new CTA. */
.wpcf7-form p.smaller {
    margin-bottom: 12px !important;
}

.wpcf7-form .cta-arrow3 {
    display: none;
}
