/*
 * ContractFlow button system — the single source for every button in wp-admin,
 * the plugin screens and the login page. WordPress classes map onto the same variants:
 *
 *   primary       .cfp-btn--primary       .button-primary, .page-title-action
 *   secondary     .cfp-btn--secondary     .button, .button-secondary
 *   gold          .cfp-btn--gold
 *   ghost         .cfp-btn--ghost
 *   danger        .cfp-btn--danger        .button.delete
 *   danger-ghost  .cfp-btn--danger-ghost
 *   danger links  core trash / delete / spam links (always red)
 *   sizes         .cfp-btn--sm / .button-small, .cfp-btn--lg / .button-large / .button-hero
 *
 * Exclusions sit inside :where() so they add no specificity and size/variant rules win.
 */

:root {
	--cfb-h: 38px;
	--cfb-h-sm: 32px;
	--cfb-h-lg: 46px;
	--cfb-radius: 10px;
	--cfb-font: 700 14px/1.2 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
	--cfb-ink: #15232c;
	--cfb-petrol: #0f4c5c;
	--cfb-petrol-2: #146b7d;
	--cfb-petrol-soft: #e4f0f1;
	--cfb-gold: #c39a45;
	--cfb-line: #e4ddcf;
	--cfb-rose: #b42d3a;
	--cfb-focus: 0 0 0 2px #fff, 0 0 0 4px rgba(195, 154, 69, .75);
}

/* ---------- Base ---------- */
.cfp-btn,
body.cfp-theme .button:where(:not(.button-link, .show-settings, .wp-color-result, .handlediv, .notice-dismiss)),
body.cfp-theme .page-title-action,
body.login .button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: var(--cfb-h); height: auto; margin: 0; padding: 0 16px;
	border: 1px solid transparent; border-radius: var(--cfb-radius);
	font: var(--cfb-font); text-decoration: none; text-shadow: none; white-space: nowrap; vertical-align: middle; cursor: pointer;
	box-shadow: 0 1px 0 rgba(21, 35, 44, .04);
	transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.cfp-btn:active, body.cfp-theme .button:active, body.cfp-theme .page-title-action:active { transform: translateY(1px); }
.cfp-btn:focus-visible, body.cfp-theme .button:focus, body.cfp-theme .page-title-action:focus, body.login .button:focus { outline: 0; box-shadow: var(--cfb-focus); }
.cfp-btn .cfp-icon, .cfp-btn .dashicons, body.cfp-theme .button .dashicons, body.cfp-theme .button.dashicons-before::before {
	flex: none; width: 16px; height: 16px; margin: 0; padding: 0; font-size: 16px; line-height: 16px; vertical-align: 0;
}

/* ---------- Secondary (the default WordPress button) ---------- */
.cfp-btn--secondary,
body.cfp-theme .button:where(:not(.button-primary, .button-link, .show-settings, .wp-color-result, .handlediv, .notice-dismiss, .delete, .cfp-btn)) {
	background: #fff; border-color: var(--cfb-line); color: var(--cfb-ink);
}
.cfp-btn--secondary:hover,
body.cfp-theme .button:where(:not(.button-primary, .button-link, .show-settings, .wp-color-result, .handlediv, .notice-dismiss, .delete, .cfp-btn)):hover {
	background: #fbfaf6; border-color: var(--cfb-petrol-2); color: var(--cfb-petrol);
}

/* ---------- Primary ---------- */
.cfp-btn--primary,
body.cfp-theme .button-primary,
body.cfp-theme .page-title-action,
body.login .button-primary {
	background: linear-gradient(180deg, #13606f, var(--cfb-petrol)); border-color: var(--cfb-petrol); color: #fff;
	box-shadow: 0 6px 14px -8px rgba(15, 76, 92, .8);
}
.cfp-btn--primary:hover, .cfp-btn--primary:focus,
body.cfp-theme .button-primary:hover, body.cfp-theme .button-primary:focus,
body.cfp-theme .page-title-action:hover, body.cfp-theme .page-title-action:focus,
body.login .button-primary:hover, body.login .button-primary:focus {
	background: linear-gradient(180deg, #187a8d, var(--cfb-petrol-2)); border-color: var(--cfb-petrol-2); color: #fff;
}

/* ---------- Gold, ghost, danger ---------- */
.cfp-btn--gold { background: linear-gradient(180deg, #d6b062, var(--cfb-gold)); border-color: #b98f3c; color: var(--cfb-ink); box-shadow: 0 6px 14px -8px rgba(195, 154, 69, .9); }
.cfp-btn--gold:hover { background: linear-gradient(180deg, #e0bd72, #cda552); color: var(--cfb-ink); }
.cfp-btn--ghost { background: var(--cfb-petrol-soft); border-color: #cfe2e5; color: var(--cfb-petrol); box-shadow: none; }
.cfp-btn--ghost:hover { background: #d6e9ec; border-color: var(--cfb-petrol-2); color: var(--cfb-petrol); }
.cfp-btn--danger, body.cfp-theme .button.delete { background: linear-gradient(180deg, #c63c49, var(--cfb-rose)); border-color: var(--cfb-rose); color: #fff; }
.cfp-btn--danger:hover, body.cfp-theme .button.delete:hover { background: linear-gradient(180deg, #d24a57, #c0313f); color: #fff; }
.cfp-btn--danger-ghost { background: #fff6f6; border-color: #efc7ca; color: var(--cfb-rose); box-shadow: none; }
.cfp-btn--danger-ghost:hover { background: #fbe6e7; border-color: var(--cfb-rose); color: var(--cfb-rose); }
.cfp a.cfp-btn, .cfp a.cfp-btn:hover { text-decoration: none; }

/* Destructive text links on core screens (trash, delete permanently, spam, delete plugin/theme/media) stay red. */
body.cfp-theme a.submitdelete,
body.cfp-theme .row-actions .trash a,
body.cfp-theme .row-actions .delete a,
body.cfp-theme .row-actions .spam a,
body.cfp-theme .row-actions .remove a,
body.cfp-theme #delete-action a,
body.cfp-theme .plugins .delete a,
body.cfp-theme button.delete-attachment,
body.cfp-theme a.delete-theme,
body.cfp-theme .button-link-delete { color: var(--cfb-rose) !important; }
body.cfp-theme a.submitdelete:hover,
body.cfp-theme .row-actions .trash a:hover,
body.cfp-theme .row-actions .delete a:hover,
body.cfp-theme .row-actions .spam a:hover,
body.cfp-theme #delete-action a:hover,
body.cfp-theme .plugins .delete a:hover,
body.cfp-theme button.delete-attachment:hover,
body.cfp-theme .button-link-delete:hover { color: #8f1f2a !important; }

/* ---------- Sizes & layout ---------- */
.cfp-btn--sm,
body.cfp-theme .button.button-small,
body.cfp-theme .tablenav .button,
body.cfp-theme .search-box .button,
body.cfp-theme .subsubsub + .button { min-height: var(--cfb-h-sm); padding: 0 12px; border-radius: 9px; font-size: 13px; }
.cfp-btn--lg,
body.cfp-theme .button.button-large,
body.cfp-theme .button.button-hero,
body.login .button.button-primary { min-height: var(--cfb-h-lg); padding: 0 22px; font-size: 15px; }
.cfp-btn--block { width: 100%; }

/* ---------- Disabled ---------- */
.cfp-btn:disabled, .cfp-btn[aria-disabled=true],
body.cfp-theme .button:disabled, body.cfp-theme .button[disabled], body.cfp-theme .button.disabled {
	opacity: .55; cursor: not-allowed; transform: none; box-shadow: none;
}
body.cfp-theme .button-primary:disabled, body.cfp-theme .button-primary[disabled], body.cfp-theme .button-primary.disabled {
	background: #8fb7bf; border-color: #8fb7bf; color: #fff;
}

/* Text-style WordPress actions stay links, in the theme colours. */
body.cfp-theme .button-link { color: var(--cfb-petrol-2); }
body.cfp-theme .button-link-delete, body.cfp-theme a.submitdelete,
body.cfp-theme .row-actions .delete a, body.cfp-theme .row-actions .trash a, body.cfp-theme .row-actions .spam a { color: var(--cfb-rose); }
