/**
 * Captivise Button Styles — site-wide CTA colour consolidation.
 *
 * Targets the common selectors Storefront, WooCommerce, Gravity Forms,
 * and the Captivise plugin suite use for primary action buttons, and
 * forces them to a single consistent royal blue / white text treatment.
 *
 * EXCLUDED on purpose (kept untouched, whatever colour they currently are):
 *   - Anything with a recognised destructive/danger class — .delete,
 *     .remove, .cancel, .reject, .danger, .button-danger, WooCommerce's
 *     own button.cancel — so destructive actions stay visually distinct
 *     if/when such styling exists.
 *   - Anything explicitly opted out via .captbtn-skip (escape hatch for
 *     one-off exceptions without editing this file).
 *
 * Specificity strategy: WooCommerce/Storefront often use single-class
 * selectors (.button) at low specificity, sometimes a tag context
 * (a.button). We match at the same shape but with !important on the
 * colour properties only — never on layout/spacing — so this plugin
 * can't accidentally break button sizing/positioning, only recolour.
 */

/* ---------------------------------------------------------------------
 * Base state — the royal blue treatment.
 * ------------------------------------------------------------------ */

.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger),
a.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger),
button.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger),
input.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger),
input[type="submit"]:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger),
.wc-block-components-button:not(.captbtn-skip):not(.is-danger),
.woocommerce #respond input#submit:not(.captbtn-skip),
.woocommerce a.button:not(.captbtn-skip),
.woocommerce button.button:not(.captbtn-skip),
.woocommerce input.button:not(.captbtn-skip),
.gform_button:not(.captbtn-skip),
.gform_wrapper .gform_footer input[type="submit"]:not(.captbtn-skip),
.gform_wrapper .gform_page_footer input[type="button"]:not(.captbtn-skip) {
	background-color: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	color: #ffffff !important;
}

/* ---------------------------------------------------------------------
 * Hover / focus — slightly darker for feedback, still clearly "blue".
 * ------------------------------------------------------------------ */

.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger):hover,
a.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger):hover,
button.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger):hover,
input.button:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger):hover,
input[type="submit"]:not(.captbtn-skip):not(.delete):not(.remove):not(.cancel):not(.reject):not(.danger):not(.button-danger):hover,
.woocommerce a.button:not(.captbtn-skip):hover,
.woocommerce button.button:not(.captbtn-skip):hover,
.woocommerce input.button:not(.captbtn-skip):hover,
.gform_button:not(.captbtn-skip):hover,
.button:not(.captbtn-skip):focus,
a.button:not(.captbtn-skip):focus {
	background-color: #1742b8 !important;
	border-color: #1742b8 !important;
	color: #ffffff !important;
}

/* ---------------------------------------------------------------------
 * Disabled / inactive — same blue, dimmed via opacity rather than grey,
 * per explicit instruction. Cursor stays "not-allowed" for affordance.
 * ------------------------------------------------------------------ */

.button:disabled:not(.captbtn-skip),
.button.disabled:not(.captbtn-skip),
a.button.disabled:not(.captbtn-skip),
button.button:disabled:not(.captbtn-skip),
input.button:disabled:not(.captbtn-skip),
input[type="submit"]:disabled:not(.captbtn-skip),
.gform_button:disabled:not(.captbtn-skip) {
	background-color: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	color: #ffffff !important;
	opacity: 0.55 !important;
	cursor: not-allowed !important;
}

/* ---------------------------------------------------------------------
 * Note on the Captivise calculator widget: its accent colour is set via
 * an inline style (--captcalc-accent) on .captcalc-widget, which always
 * wins over a stylesheet rule regardless of specificity or !important
 * on the custom property itself. It is NOT overridden here — the fix
 * lives at the source in captivise-calculators.php (the hardcoded
 * default passed to captcalc_render_widget_html() for the standalone
 * page), which has been updated to #1d4ed8 directly. Partner-embedded
 * instances use whichever colour that partner's record specifies, by
 * design, and are intentionally left alone.
 * ------------------------------------------------------------------ */

