/**
 * BD B2B Loans — the watchlist toggle button.
 *
 * This plugin owns the button: it is rendered by
 * bd_b2b_loans_render_watchlist_button(), and this is the one stylesheet
 * that describes it. Until 0.56.0 it was described by three — bd-read-reader's
 * watchlist.css carried an unscoped copy that could and did land on the same
 * page as this one, and bd-cat-quickview reskinned it a third time — so which
 * rules won depended on enqueue order. bd-read-reader's copy is gone and
 * bd-cat-quickview's is now only what is genuinely specific to its sidebar.
 *
 * Shape, size and colour come from bd-core-shared: the markup carries `bd-btn
 * bd-btn--ghost` (`bd-btn--primary` while watching) alongside
 * `.bd-btn-watchlist` (default 44px, like the buttons
 * beside it in the preview sidebar), its heart glyph is bd-core-shared's `.bd-icon`
 * spaced by the button's own gap, and what is left here is the two states that
 * button has and no other does.
 *
 * @package BdReservations
 */

/* Size comes from bd-core-shared's `bd-btn` on the markup, never from here. */
.bd-btn-watchlist {
	margin-top: var(--bd-space-xs, 4px);
}

/* No colours here, in any state. "Already watching" is bd-core-shared's
   `bd-btn--primary`, not watching its `bd-btn--ghost` (the markup and the JS
   swap the two), so both take the shared hovers: colour changes only, WCAG AA
   in every state, the shared focus outline. */

/* Two states that look different on purpose.

   UNAVAILABLE (`.bd-btn-watchlist--disabled` with `bd-modal-opener`, set at
   render time): copies are free right now, so watching would achieve nothing.
   It is still a working button: it opens bd-core-shared's modal saying why, and its
   accessible name says it is unavailable. So it keeps the plain ghost look at
   full contrast. No opacity: navy at 50% on the tint measures 3.08:1, which
   fails WCAG 1.4.3, and the disabled exemption does not cover a control that
   still does something. No `not-allowed` cursor either. Never `aria-disabled`,
   never a `title`.

   BUSY (the `disabled` attribute, set by assets/js/watchlist-button.js while a
   request is in flight): really disabled for a moment, with nothing to
   explain. bd-core-shared's `.bd-btn[disabled]` already draws it muted, so this
   sheet only blocks the pointer. */
.bd-btn-watchlist[disabled] {
	cursor: not-allowed;
	pointer-events: none;
}

.bd-watchlist-inline-error {
	display: block;
	margin-top: var(--bd-space-xs, 4px);
	font-family: var(--bd-font-sans, inherit);
	font-size: var(--bd-fs-sm, 14px);
	color: var(--bd-danger, #B3261E);
}
