/* OUR BUTTONS AGAINST THE THEME — ONE GUARD (Michal, 2026-11-24).

   WHY THE THEME WON. BuddyBoss's theme.min.css paints every <button> and
   input[type=submit|button] on a BuddyBoss page:
       .buddypress .buddypress-wrap button, …, button, input[type=submit] {
         background-color: var(--bb-primary-button-background-regular);
         color: var(--bb-primary-button-text-regular); border: 1px solid …;
         padding: 10px 20px; font-size: 15px; … }
   — specificity (0,2,1). Our button classes are (0,1,0) – (0,2,0), so every
   property we had NOT marked !important went to the theme. We had marked the
   TEXT colour !important and not the background: our dark ink on the theme's
   button colour ("Odstrániť", "Pridať skúšku" — dark text on teal).

   THE GUARD. Each variant below only sets TOKENS (--sch-btn-*); one rule per
   state turns them into the real properties with !important, for both button
   families (.sch-sbtn* and .schsc-btn*), wherever our markup is. No per-button
   overrides anywhere; a new variant is a new token set. tools/theme-contrast-
   check.php renders our pages with the REAL theme CSS and fails on any control
   under 4.5:1 or painted by the theme.

   DESTRUCTIVE ACTIONS ARE NEVER PRIMARY: the danger variant is a small outline
   (red ink, red hairline, white), and the action asks before it runs. */

:is(.sch-sbtn, .schsc-btn) {
	--sch-btn-bg: #227F77;  --sch-btn-fg: #fff;    --sch-btn-bd: #227F77;
	--sch-btn-bg-h: #1c6e67; --sch-btn-fg-h: #fff; --sch-btn-bd-h: #1c6e67;
	--sch-btn-pad: 8px 14px; --sch-btn-fs: 14px;   --sch-btn-h: 38px;
	--sch-btn-sh: none;
}
:is(.sch-sbtn-primary) { --sch-btn-sh: 0 6px 16px -8px rgba(34, 127, 119, .9); }
:is(.sch-sbtn-ghost, .schsc-btn.is-ghost) {
	--sch-btn-bg: #fff;      --sch-btn-fg: #122B46; --sch-btn-bd: rgba(18, 43, 70, .28);
	--sch-btn-bg-h: #fff;    --sch-btn-fg-h: #1a6b63; --sch-btn-bd-h: #227F77;
}
:is(.sch-sbtn-quiet, .schsc-btn.is-quiet) {
	--sch-btn-bg: transparent; --sch-btn-fg: #4A5A6E; --sch-btn-bd: transparent;
	--sch-btn-bg-h: rgba(34, 127, 119, .10); --sch-btn-fg-h: #1a6b63; --sch-btn-bd-h: transparent;
	--sch-btn-pad: 6px 10px; --sch-btn-h: 32px;
}
:is(.sch-sbtn-danger, .schsc-btn.is-danger) {
	--sch-btn-bg: #fff;      --sch-btn-fg: #9B2D22; --sch-btn-bd: rgba(155, 45, 34, .45);
	--sch-btn-bg-h: #FBECEA; --sch-btn-fg-h: #7F1D1D; --sch-btn-bd-h: #9B2D22;
	--sch-btn-pad: 4px 10px; --sch-btn-fs: 13px; --sch-btn-h: 32px; --sch-btn-sh: none;
}
:is(.sch-sbtn-sm, .schsc-btn.is-sm) { --sch-btn-pad: 4px 10px; --sch-btn-fs: 13px; --sch-btn-h: 32px; }

/* THE ONE GUARD — tokens → properties, !important, in every scope our markup lives in */
:is(.schsc, .schcoh, .sch-shell, .sch-glass-page, .sch-sc-page) :is(.sch-sbtn, .schsc-btn),
:is(.sch-sbtn, .schsc-btn):is(.schsc, .schcoh) {
	background: var(--sch-btn-bg) !important;
	color: var(--sch-btn-fg) !important;
	border: 1px solid var(--sch-btn-bd) !important;
	padding: var(--sch-btn-pad) !important;
	font-size: var(--sch-btn-fs) !important;
	min-height: var(--sch-btn-h) !important;
	box-shadow: var(--sch-btn-sh) !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	line-height: 1.2 !important;
	border-radius: 9px !important;
	text-shadow: none !important;
	text-decoration: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center;
	gap: 6px !important;
	width: auto;
}
:is(.schsc, .schcoh, .sch-shell, .sch-glass-page, .sch-sc-page) :is(.sch-sbtn, .schsc-btn):is(:hover, :focus-visible):not([disabled]) {
	background: var(--sch-btn-bg-h) !important;
	color: var(--sch-btn-fg-h) !important;
	border-color: var(--sch-btn-bd-h) !important;
}
:is(.schsc, .schcoh, .sch-shell, .sch-glass-page, .sch-sc-page) :is(.sch-sbtn, .schsc-btn) :is(svg, i, .ti) { color: inherit !important; }

/* EVERY OTHER <button> IN OUR UI (search results, attendance toggles, menu
   items): the theme's generic button paint is turned off — its colours come
   from the --bb-* button variables, which on our elements resolve to "none". */
:is(.schsc, .schcoh) :is(button, input[type=submit], input[type=button]):not(.sch-sbtn):not(.schsc-btn) {
	--bb-primary-button-background-regular: transparent;
	--bb-primary-button-background-hover: transparent;
	--bb-primary-button-border-regular: transparent;
	--bb-primary-button-border-hover: transparent;
	--bb-primary-button-text-regular: var(--sch-ink, #1F2A37);
	--bb-primary-button-text-hover: var(--sch-ink, #1F2A37);
}
