/* ===========================================================================
   ALLOut Button — additions to Button System v2.
   Author: ALLOut Security — https://alloutsecurity.com

   WHY THIS FILE EXISTS AND aos-btn-v2.css DOES NOT CHANGE.

   `aos-btn-v2.css` is the design handoff, shipped byte for byte as it was
   delivered (md5 970f9cbeb5da85d144707e441f6aae87). That identity is worth
   keeping: it is how anyone can prove the site is running the system that was
   designed, rather than a copy somebody edited. So everything this PLUGIN adds
   on top of the system lives here instead, loaded straight after it.

   Two things, both small.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. THE ICON IS NOT ITALIC TYPE.

   The icon is an <i>, and <i> is italic by default in every browser. On a
   normal page BeTheme's own icon-font CSS resets that, so nothing showed —
   but a context that loads the button's stylesheet WITHOUT the theme's (the
   builder's isolated preview frame, the admin list, an editor canvas) had
   nothing doing the reset, and the browser synthesised an oblique: the glyph
   arrived visibly skewed. A glyph is a picture, never type, so this is stated
   here rather than left to whatever else happens to be on the page.
   ------------------------------------------------------------------------- */
.aos-btn-v2 .button_icon,
.aos-btn-v2 .button_icon i,
.aos-btn-v2 .button_icon:before,
.aos-btn-v2 .button_icon i:before {
  font-style: normal;
}

/* ---------------------------------------------------------------------------
   2. UNDERLINE CONTROL FOR THE LINK VARIANT.

   The system draws a link as underlined text, which is right inside a
   paragraph and wrong for the places this site actually uses a link variant:
   a card that is entirely clickable, a row of navigation, a "read more" under
   a heading. Two extra settings, both opt-in — leave the setting alone and the
   composed class string is unchanged, so no button already saved moves.

     (default)          underlined, exactly as the handoff draws it
     --u-hover          underline appears on hover and on keyboard focus
     --u-none           no underline at any time

   Specificity note: the handoff underlines `.aos-btn-v2--link .button_label`
   at (0,2,0) !important, so every rule here pairs the variant class with the
   modifier to land at (0,3,0) or higher. Source order alone would be enough —
   this file loads after — but a stylesheet that only works because of load
   order breaks the first time somebody concatenates or reorders assets.

   ACCESSIBILITY, AND WHY IT IS NOT OPTIONAL HERE.

   Read the handoff's own comment at its focus block: "the underline IS the
   focus indicator here — there is no ring". The link variant deliberately
   draws no outline, because a text link shows focus by thickening its
   underline. Take the underline away and a keyboard user has NOTHING — the
   focus indicator vanishes with it (WCAG 2.4.7).

   So `--u-none` puts the ring back. That is not a style opinion attached to
   the option, it is the other half of it: this is the one combination where
   removing an underline silently removes something else.

   `--u-hover` needs no ring, because it underlines on :focus-visible too — the
   indicator is simply drawn at the moment it is needed.

   What this does NOT try to solve: a link with no underline sitting inside a
   run of body copy is distinguished from the text around it by colour alone,
   which is WCAG 1.4.1. No stylesheet can tell whether that is where the button
   sits, so the builder says so at the point the choice is made.
   ------------------------------------------------------------------------- */

/* --- Never underlined. ---------------------------------------------------- */
.aos-btn-v2--link.aos-btn-v2--u-none .button_label,
.aos-btn-v2--link.aos-btn-v2--u-none:is(:hover, .is-hover) .button_label,
.aos-btn-v2--link.aos-btn-v2--u-none:is(:active, .is-active) .button_label,
.aos-btn-v2--link.aos-btn-v2--u-none:is(:focus, :focus-visible, .is-focus) .button_label {
  text-decoration: none !important;
}

/* The ring the underline was standing in for. Tripled to clear the handoff's
   own (0,3,0) `outline: 0 !important` on a focused link. */
.aos-btn-v2.aos-btn-v2--link.aos-btn-v2--u-none.aos-btn-v2--u-none:is(:focus-visible, .is-focus) {
  outline: 2.5px solid var(--aosb-ring) !important;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Underlined only when pointed at, or focused. ------------------------- */
.aos-btn-v2--link.aos-btn-v2--u-hover .button_label {
  text-decoration: none !important;
}
.aos-btn-v2--link.aos-btn-v2--u-hover:is(:hover, .is-hover, :focus, :focus-visible, .is-focus) .button_label {
  text-decoration: underline !important;
  text-decoration-thickness: .07em !important;
  text-underline-offset: .18em;
}
/* Focus is held rather than passing, so it reads heavier than hover — the same
   relationship the handoff sets up between its own hover and focus weights. */
.aos-btn-v2--link.aos-btn-v2--u-hover:is(:focus-visible, .is-focus) .button_label {
  text-decoration-thickness: .15em !important;
}
/* At display sizes .07em is a 3px rule that reads as a border, so both states
   thin proportionally — mirroring what the handoff does for t28–t42. */
.aos-btn-v2--link.aos-btn-v2--u-hover:is(.aos-btn-v2--t28, .aos-btn-v2--t32, .aos-btn-v2--t36, .aos-btn-v2--t42):is(:hover, .is-hover) .button_label {
  text-decoration-thickness: .045em !important;
}
.aos-btn-v2--link.aos-btn-v2--u-hover:is(.aos-btn-v2--t28, .aos-btn-v2--t32, .aos-btn-v2--t36, .aos-btn-v2--t42):is(:focus-visible, .is-focus) .button_label {
  text-decoration-thickness: .09em !important;
}

/* A locked or disabled link is not interactive, so hover must not offer it an
   underline it cannot act on. */
.aos-btn-v2--link.aos-btn-v2--u-hover:is(.aos-btn-v2--locked, .aos-btn-v2--disabled):is(:hover, .is-hover) .button_label {
  text-decoration: none !important;
}
