/*
 * Blueprint Suite — Global GF Submit Button
 *
 * Provides position:relative + ::after mask ring for every button.gform_button
 * on the site (the gform_submit_button filter in shared-loader.php ensures all
 * GF input[type=submit] are converted to <button> so ::after is always available).
 *
 * Components set ring values by mapping their scoped vars to these globals:
 *   --rw-gf-ring    gradient or solid colour for the border ring
 *   --rw-gf-ring-w  ring width  (defaults to 0px → invisible)
 *   --rw-gf-ring-h  ring hover  (defaults to --rw-gf-ring)
 *
 * Example component mapping (in the component's own CSS scope):
 *   .my-wrapper { --rw-gf-ring: var(--my-btn-ring, transparent); ... }
 */

button.gform_button,
button[type="submit"].gform_button {
    position: relative !important;
    height: auto !important;
    font-family: inherit;
}

button.gform_button::after,
button[type="submit"].gform_button::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    padding: var( --rw-gf-ring-w, 0px ) !important;
    background: var( --rw-gf-ring, transparent ) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: destination-out !important;
    mask-composite: exclude !important;
    pointer-events: none;
    transition: background 0.25s ease;
}

button.gform_button:hover::after,
button[type="submit"].gform_button:hover::after {
    background: var( --rw-gf-ring-h, var( --rw-gf-ring, transparent ) ) !important;
}

/* Fallback for any input[type=submit] not caught by the filter */
input[type="submit"].gform_button,
input[type="submit"] {
    border: var( --rw-gf-ring-w, 0px ) solid var( --rw-gf-ring, transparent ) !important;
}
