/**
 * OTA button styles.
 *
 * Reproduces the "Button" component from the OTA design file. That component
 * draws 160 variants across five axes, which is not 160 things to write: four
 * of the axes are independent classes and the fifth, State, is what CSS calls
 * pseudo-classes. So this file is four axes of modifier class plus :hover,
 * :focus-visible and a disabled rule.
 *
 *   Type    ota-btn--primary | --secondary | --outline | --ghost
 *   Size    ota-btn-size--sm | --lg                    (unset is Medium)
 *   Arrow   ota-btn-arrow--bare | --none               (unset is the circle)
 *   Colour  ota-btn-colour--ochre                      (unset is CTA)
 *
 * TWO WAYS IN
 *
 * Every rule below carries two selectors, and they are two ways to reach the
 * same drawing rather than two implementations of it:
 *
 *   A  .ota-btn                             template markup, class on the element
 *   B  .elementor-widget-button ...         Elementor's Button widget
 *   C  .elementor-widget-call-to-action ... Elementor's Call to Action widget

 * Branch C is the member dashboard's cards, and it exists because that widget is
 * not the Button widget: its painted element is `.elementor-cta__button` and it
 * has no inner row, so the badge and glyph hang off the button's own two
 * pseudo-elements rather than a row's. Because of that its Arrow default is "No
 * arrow" rather than the Circle the other branches default to, so that turning
 * the drawing on did not put a badge on every Call to Action already published.
 * See Buttons::add_controls(). It also carries a doubled
 * class to reach 0,4,0, which it needs to clear the theme's
 * `.elementor-cta--skin-classic.elementor-cta--skin-classic .elementor-button.elementor-cta__button`
 * at the same weight. That works only because the stylesheet is enqueued at
 * priority 20, after the theme's CSS and before Elementor's per-widget CSS: equal
 * weight, so load order decides, and it decides in favour of the design against
 * the theme and in favour of the editor against the design.
 *
 * Branch B is why the modifier classes cannot simply live on the button.
 * Elementor's `prefix_class` writes to the widget wrapper, never to the inner
 * `<a class="elementor-button">` that is actually painted, and it updates live
 * in the editor with no re-render, which is the property worth keeping. See
 * Buttons::add_controls().
 *
 * Branch A is the hook the design file itself asks for: layers in the Event
 * Listing, Search and OTA Dashboard frames are named `Button ota-btn
 * ota-btn--md ota-btn--outline` with an `ota-btn__badge` child, on surfaces that
 * are page templates rather than Elementor Button widgets. Nothing in the plugin
 * emits branch A yet. It exists so that attaching a template, a WooCommerce
 * button or a Gravity Forms submit is a markup change and not a second
 * stylesheet.
 *
 * Branch A expects a Type modifier alongside the base class, exactly as branch B
 * does. `.ota-btn` on its own gets the geometry with no paint, because paint
 * comes from the Type rules, and that is a markup error rather than a state
 * worth designing for.
 *
 *   <a class="ota-btn ota-btn--primary">
 *     <span class="ota-btn__inner">Label</span>
 *   </a>
 *
 * The inner span is what carries the circle badge and the arrow glyph, since
 * they are its two pseudo-elements. It is optional: a branch A button without
 * one is an arrow-less pill, which is the right default for markup that already
 * puts a Font Awesome glyph in its own `::before`, as much of the Agend theme
 * does.
 *
 * A branch A button with no inner span must also carry `ota-btn-arrow--none`.
 * The base rule tightens `padding-inline-end` so the circle badge sits near the
 * pill's trailing edge, and with no badge to justify it that leaves 28px of
 * leading padding against 8px of trailing, which reads visibly lopsided. The
 * arrow modes are the only thing that resets it, and no CSS selector can ask
 * whether a child element exists.
 *
 * TWO PAINT MODES ARE THE WHOLE DESIGN
 *
 * Every type in the design file is one of two paint modes, and hover swaps
 * which one applies:
 *
 *   solid   background = fill,        text = on-fill, badge = on-fill, glyph = fill
 *   hollow  background = transparent, text = fill,    badge = fill,    glyph = on-fill
 *
 *   Primary, Secondary  solid at rest  -> hollow on hover
 *   Outline, Ghost      hollow at rest -> solid on hover   (Ghost hides its border at rest)
 *
 * That is why there is no per-type colour anywhere below. A type only picks a
 * paint mode, a colour only picks the `fill` / `on-fill` pair, and one rule
 * consumes the result. Adding a third button colour is three lines.
 *
 * HOW THE COLOUR THEMES FEATURE REACHES THIS
 *
 * `fill` and `on-fill` read the `--ota-*` role properties that
 * Colour_Themes::generate_css() emits, so applying a theme to a container
 * re-paints every button inside it with no per-button work. Those roles are also
 * seeded on `:root`, so they resolve outside Elementor too and branch A needs no
 * plumbing of its own. The hex fallbacks are the design file's own values, for
 * when no theme is configured.
 *
 * SPECIFICITY, DELIBERATELY
 *
 * Branch B's type and state rules only set custom properties. A single rule per
 * element consumes them, at 0,3,0. That is above the Agend theme's
 * `.elementor-button.elementor-button { padding }` at 0,2,0 in
 * src/scss/modules/_elementor.scss, and below the 0,4,0 Elementor writes for a
 * control set on one widget. So the variant holds against the theme, and an
 * editor who sets a colour on a specific button still wins. That is the same
 * call Colour_Themes makes: an explicit override is the editor's to make.
 *
 * Branch A sits at 0,1,0 and 0,2,0, deliberately low. It is below the theme's
 * own button rules, which are nested under `html body` and so start at 0,1,2, and
 * it stays there. Whatever could already override a button, in Elementor's Style
 * tab or in the theme, still can. Winning against the theme on the surfaces that
 * want it is a separate, opt-in job, and it belongs in a stylesheet of its own
 * that names the properties the theme forces rather than in this baseline.
 *
 * The `:is()` list on branch B is how a base rule reaches all four types without
 * a shared base class. One class per axis is all `prefix_class` can write, and
 * the Type control owns the only prefix that could carry a base class, so the
 * list is cheaper than the alternatives and keeps every selector's weight
 * identical.
 */

.ota-btn,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button {
	/*
	 * Size tokens. Unset Size is Medium, so these are the Medium values and
	 * ota-btn-size--sm / --lg replace them. Keeping the default here rather
	 * than in an `ota-btn-size--md` class means a button that has not been
	 * given a size carries no size class at all, which matters because
	 * `prefix_class` ignores a control's `condition` and would otherwise stamp
	 * a default onto every Button widget on the site, OTA or not.
	 *
	 * The design file's numbers are 62.445px tall with a 31.445px badge and a
	 * 15.297px icon. Those decimals are instance-resize artefacts, not a spec,
	 * so they are rounded to the 52 / 64 / 80 and 28 / 32 / 40 they are
	 * reaching for. The visual difference is under a pixel.
	 *
	 * The design file's own in-page buttons, the ones annotated `ota-btn--md`
	 * in the Event Listing, Search and Dashboard frames, are drawn 48px tall
	 * rather than 62. That is unresolved: it may want a fourth size, or those
	 * frames may predate the component. Left alone here.
	 */
	--ob-height: 64px;
	--ob-badge: 32px;
	--ob-icon: 16px;
	--ob-font-size: 17px;
	--ob-pad-inline: 30px;
	/* The trailing side tightens so the badge sits near the edge. Circle only:
	   the design keeps the padding symmetrical without one. */
	--ob-pad-badge-side: 10px;
	/*
	 * The trailing padding as a value rather than a property. The arrow modes and
	 * branch C all want a different one, and if each sets `padding-inline-end`
	 * itself then anything that has to restate the padding has to restate their
	 * logic too. Setting a token means one declaration consumes it. That is what
	 * makes the skin-2020 override at the bottom of this file two lines.
	 */
	--ob-pad-end: var(--ob-pad-badge-side);
	--ob-gap: 12px;
	--ob-border: 2px;

	/*
	 * Colour tokens. Unset Colour is CTA, same reasoning as the size default.
	 * A colour only ever supplies this pair: the badge and the arrow are always
	 * derived from it by inverting, never configured separately. See the note on
	 * the ochre rule for why.
	 */
	--ob-fill: var(--ota-cta-bg, #003038);
	--ob-on-fill: var(--ota-cta-text, #ffffff);

	/*
	 * The focus ring. The design file hardcodes this rgba rather than binding a
	 * variable, so it does not follow a colour theme. Kept as the design has it
	 * but exposed as a token, so pointing it at a role later is a one-line
	 * change and needs nothing here to move.
	 */
	--ob-focus-ring: rgba(73, 199, 218, 0.55);

	--ob-arrow: url("../img/ota-btn-arrow.svg");

	/*
	 * The design file sets NB International Pro Bold. Naming the family is not
	 * optional here: the Agend theme puts `--at-font-family-condensed` on every
	 * Elementor button, which skin-2022 defines as Source Sans Pro, so leaving
	 * the family alone does not inherit the design font, it inherits the
	 * theme's. "NB International Pro" is the family the Elementor custom font
	 * registers, which is the one that actually resolves.
	 */
	--ob-font-family: "NB International Pro", sans-serif;

	/*
	 * Every button carries the border at rest, transparent when the type does
	 * not want one. Primary has no border at rest and a 2px one on hover, and
	 * adding that border on hover for real would grow the button 4px and shove
	 * the layout sideways. The design file hides this because its frames are a
	 * fixed height. The Secondary variant's 1.5px transparent border is the
	 * same trick, drawn. The colour is set by the paint rule below, so it can
	 * reach the states the theme also styles.
	 */
	border-width: var(--ob-border);
	border-style: solid;

	/*
	 * The only two !important declarations in this file, and they are answering
	 * one specific rule rather than hedging. The Agend theme forces the radius
	 * and the font size on every Elementor button through
	 * `.elementor-widget-button:not(.exclude-agend-theme-link) a`, which is
	 * 0,2,1 and marks exactly these two !important. !important against
	 * !important is settled by specificity and branch B is 0,3,0, so these win
	 * and nothing else here needs the hammer.
	 *
	 * The theme does offer `.exclude-agend-theme-link` as an opt-out and it
	 * would be tidier, but it has to land on the <a> and only PHP can put it
	 * there. Elementor renders a widget from its JS template once you edit it,
	 * so the class would be missing in the editor preview and the design would
	 * look broken in the one place it is being built.
	 *
	 * Branch A carries them too, because the theme's own button mixin marks
	 * `font-size` !important as well (lib/mixins/_button.scss) and branch A is
	 * only 0,1,0. That is the one place the baseline cannot stay out of the
	 * way, and it is two properties rather than a blanket.
	 */
	border-radius: 999px !important;
	font-size: var(--ob-font-size) !important;

	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/*
	 * The same gap the inner row uses, declared here as well so it also applies
	 * to a button that has no inner span. That is the documented shape for
	 * markup bringing its own Font Awesome glyph, and without this the label and
	 * the glyph sit against each other. A no-op for every button that does have
	 * an inner span, since a flex container with one child has nothing to space.
	 */
	gap: var(--ob-gap);
	min-height: var(--ob-height);

	/*
	 * Derived rather than typed, so the three sizes cannot drift out of
	 * agreement with their own heights: the badge is the content, the rest of
	 * the height is padding, and the border is inside the box. min-height then
	 * holds the pill at its size for the two arrow modes whose content is
	 * shorter than a badge.
	 */
	padding-block: calc((var(--ob-height) - var(--ob-badge)) / 2 - var(--ob-border));
	padding-inline: calc(var(--ob-pad-inline) - var(--ob-border));
	padding-inline-end: calc(var(--ob-pad-end) - var(--ob-border));

	font-family: var(--ob-font-family);
	/* The design sets Bold, and line-height 1 is exactly what it draws: 15/15,
	   17/17 and 22/22 across the three sizes. */
	font-weight: 700;
	line-height: 1;
	text-decoration: none;

	/*
	 * Claimed rather than left alone, because the Agend theme's button mixin
	 * sets `text-transform: var(--at-button-text-transform)` and the customiser
	 * exposes that as a field under Agend Theme > Buttons. It defaults to `none`,
	 * so nothing was wrong, but a single unrelated customiser change would
	 * otherwise put every OTA button on the site into uppercase with no
	 * per-button way out. The design draws sentence case.
	 */
	text-transform: none;

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}

/*
 * The underline, and why it takes a rule of its own.
 *
 * The base rule above already says `text-decoration: none`, and at rest that is
 * enough: branch A is 0,1,0 and the user agent's `a` is 0,0,1. Under the pointer
 * it is not. The theme carries `a:hover { text-decoration: underline }` at 0,1,1,
 * which outranks branch A, so every `.ota-btn` that happens to be an anchor grew
 * an underline through its label on hover. Naming the states here takes this to
 * 0,2,0 and settles it.
 *
 * Branch A only. Branches B and C are already 0,3,0 and 0,4,0, so they were
 * never exposed to this, and adding them would be three more selectors earning
 * nothing.
 *
 * Worth knowing why this went unnoticed: a `.ota-btn` with no destination is
 * rendered as a `<button>`, and `a:hover` cannot reach one. Every button on the
 * home page is destination-less at the moment, so the fault only appears on the
 * ones that actually link somewhere.
 */
.ota-btn:hover,
.ota-btn:focus,
.ota-btn:focus-visible,
.ota-btn:active {
	text-decoration: none;
}

/*
 * Branch C: where the badge and the glyph hang.
 *
 * This used to be a padding correction that assumed branch C could never draw a
 * badge, on the grounds that the badge and glyph are the inner row's two
 * pseudo-elements and the Call to Action button has no inner row. True of the
 * markup, but the wrong conclusion: the button itself is the flex container on
 * this branch, and its own two pseudo-elements are free, so they can carry what
 * the inner row carries elsewhere. The badge and arrow rules below name branch C
 * on the button rather than on a row, and the padding now follows the arrow mode
 * exactly as it does on A and B.
 *
 * The client reported the Arrow control doing nothing on a Call to Action widget
 * (Teamwork 49568676). It had no drawing to switch, only a class no rule read.
 *
 * The 12px between label and badge is already handled: the base rule declares
 * `gap` on the button for markup with no inner span, and that is exactly this.
 * The one thing this branch has to do differently is find the badge with no
 * inner row to anchor the glyph to, and that is written where the glyph is: see
 * the branch C `::before` rule under "Arrow: the circle". Nothing here needs
 * `position: relative` on the button any more, which is why this branch has no
 * rule of its own at this point in the file.
 */

/*
 * And the accent wrappers, which are the only reason branch C needs more weight
 * than 0,4,0 anywhere.
 *
 * `.agendtheme-elementor-section-header-{primary,secondary}-accent-color` in
 * src/scss/modules/elementor/widgets/_call-to-action.scss:32 and :40 sets
 * `background-color` on any `a.elementor-button` inside it, at 0,4,1. That is
 * above branch C's 0,4,0 and, worth noting, also above the 0,4,0 Elementor writes
 * for a colour set on one widget: the theme was already overriding the Style tab
 * on this surface before any of this existed. So these two selectors reach 0,5,0
 * and re-assert the paint the type resolved.
 *
 * No pseudo-class variants needed, unlike branch B's paint rule. This rule is not
 * state-scoped and the type rules move the tokens, so it picks up hover and focus
 * on its own, and at 0,5,0 there is nothing left in the theme to out-weigh.
 */
.agendtheme-elementor-section-header-primary-accent-color .elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button,
.agendtheme-elementor-section-header-secondary-accent-color .elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button {
	background-color: var(--ob-bg);
	color: var(--ob-text);
	border-color: var(--ob-line);
}

/*
 * Paint, consuming what the type and state rules resolved.
 *
 * The states are listed here rather than left to inherit from the rest state
 * because the Agend theme paints `...:hover`, `...:focus` and `...:active` in
 * its own accent colour at 0,3,1, which outranks a 0,3,0 rest-only rule. Naming
 * the pseudo-classes brings branch B to 0,4,0 and settles it. It also stays
 * below the 0,5,0 Elementor writes for a colour set on one specific widget, so
 * an editor who deliberately overrides a button still wins.
 */
.ota-btn,
.ota-btn:hover,
.ota-btn:focus,
.ota-btn:focus-visible,
.ota-btn:active,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button:hover,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:hover,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button:focus,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:focus,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button:focus-visible,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:focus-visible,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button:active,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:active {
	background-color: var(--ob-bg);
	color: var(--ob-text);
	border-color: var(--ob-line);
}

/*
 * The label and badge row. `width: max-content` is what keeps the badge flush
 * with this element's trailing edge, which is what the arrow glyph anchors to
 * below. Without it a full-width button would centre the row and leave the
 * glyph floating where the circle no longer is.
 */
.ota-btn .ota-btn__inner,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button .elementor-button-content-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--ob-gap);
	width: max-content;
}

/* Type: solid at rest. */
.ota-btn:is(.ota-btn--primary, .ota-btn--secondary),
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary) .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary) .elementor-cta__button.elementor-cta__button {
	--ob-bg: var(--ob-fill);
	--ob-text: var(--ob-on-fill);
	--ob-line: var(--ob-fill);
	--ob-badge-bg: var(--ob-on-fill);
	--ob-glyph: var(--ob-fill);
}

/* Type: hollow at rest. */
.ota-btn:is(.ota-btn--outline, .ota-btn--ghost),
.elementor-widget-button:is(.ota-btn--outline, .ota-btn--ghost) .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button {
	--ob-bg: transparent;
	--ob-text: var(--ob-fill);
	--ob-line: var(--ob-fill);
	--ob-badge-bg: var(--ob-fill);
	--ob-glyph: var(--ob-on-fill);
}

/* Ghost is Outline without the line. Must follow the hollow rule: same weight. */
.ota-btn.ota-btn--ghost,
.elementor-widget-button.ota-btn--ghost .elementor-button,
.elementor-widget-call-to-action.ota-btn--ghost .elementor-cta__button.elementor-cta__button {
	--ob-line: transparent;
}

/*
 * Hover swaps the paint mode. :hover only, not :focus. The design file's Focus
 * variant keeps the resting paint and adds the ring, so focus is handled on its
 * own further down and must not be folded in here.
 *
 * Secondary inverts with Primary. The design file draws its Default, Hover and
 * Focus pixel-identical, so it has no designed hover at all; matching Primary
 * is Bryce's call, so that it behaves like the other three rather than reading
 * as dead to a mouse.
 */
.ota-btn:is(.ota-btn--primary, .ota-btn--secondary):hover,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary) .elementor-button:hover,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary) .elementor-cta__button.elementor-cta__button:hover {
	--ob-bg: transparent;
	--ob-text: var(--ob-fill);
	--ob-line: var(--ob-fill);
	--ob-badge-bg: var(--ob-fill);
	--ob-glyph: var(--ob-on-fill);
}

.ota-btn:is(.ota-btn--outline, .ota-btn--ghost):hover,
.elementor-widget-button:is(.ota-btn--outline, .ota-btn--ghost) .elementor-button:hover,
.elementor-widget-call-to-action:is(.ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:hover {
	--ob-bg: var(--ob-fill);
	--ob-text: var(--ob-on-fill);
	--ob-line: var(--ob-fill);
	--ob-badge-bg: var(--ob-on-fill);
	--ob-glyph: var(--ob-fill);
}

/* Size. Only the two that are not the default, per the note on the base rule. */
.ota-btn.ota-btn-size--sm,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-size--sm .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-size--sm .elementor-cta__button.elementor-cta__button {
	--ob-height: 52px;
	--ob-badge: 28px;
	--ob-icon: 14px;
	--ob-font-size: 15px;
	--ob-pad-inline: 20px;
	--ob-pad-badge-side: 8px;
}

.ota-btn.ota-btn-size--lg,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-size--lg .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-size--lg .elementor-cta__button.elementor-cta__button {
	--ob-height: 80px;
	--ob-badge: 40px;
	--ob-icon: 20px;
	--ob-font-size: 22px;
	--ob-pad-inline: 38px;
	--ob-pad-badge-side: 12px;
}

/*
 * Colour. Ochre supplies the same two properties as CTA and nothing else, so
 * its badge inverts like every other colour: circle takes the text colour,
 * arrow takes the pill colour.
 *
 * The colour themes config does carry two more roles, `ochre-button-arrow-bg`
 * and `ochre-button-arrow-colour`, and this deliberately ignores them. Reading
 * them put a white circle on an ochre pill, which the design never does, and in
 * the yellow theme both roles point at the same navy so the arrow disappeared
 * entirely. Inverting cannot produce either fault: the circle and the arrow are
 * the two ends of a pair, so they can only match if a theme has set a colour on
 * itself. Nothing else in the theme or the plugin reads those two roles, so they
 * are now unused and safe to retire from the config.
 */
.ota-btn.ota-btn-colour--ochre,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-colour--ochre .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-colour--ochre .elementor-cta__button.elementor-cta__button {
	--ob-fill: var(--ota-ochre-button, #f04c3a);
	--ob-on-fill: var(--ota-ochre-button-text, #000000);
}

/*
 * Arrow: the circle. Unset Arrow, so it needs no class of its own and the two
 * alternatives switch it off below.
 *
 * The circle is a flex child, which is what makes the design's 12px gap fall
 * out of the layout rather than needing to be positioned. The glyph is absolute
 * and anchored to the row's trailing edge, which is the circle's own edge, so
 * it stays centred on the circle whatever padding the widget's own controls
 * write. Two pseudo-elements because a mask clips a box-shadow ring to the
 * arrow's shape, so one element cannot be both circle and glyph.
 */
.ota-btn .ota-btn__inner::after,
.ota-btn.ota-btn-badge--self::after,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button .elementor-button-content-wrapper::after,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button::after {
	content: "";
	/*
	 * Declared, not inherited from the browser default, because the Agend
	 * theme already owns this pseudo-element on one Call to Action skin:
	 * `.elementor-cta--skin-agendtheme .elementor-cta__button:after` sets
	 * `content` and `display: none` (_call-to-action.scss). This rule outweighs
	 * it on `content` and said nothing about `display`, so the theme's `none`
	 * cascaded through and the badge vanished on that skin. Raised by Nathan on
	 * PR #52. Harmless on A and B, which already render as flex items.
	 */
	display: block;
	flex: 0 0 auto;
	width: var(--ob-badge);
	height: var(--ob-badge);
	border-radius: 50%;
	background-color: var(--ob-badge-bg);
}

.ota-btn .ota-btn__inner::before,
.ota-btn.ota-btn-badge--self::before,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button .elementor-button-content-wrapper::before,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button::before {
	content: "";
	position: absolute;
	top: 50%;
	inset-inline-end: calc((var(--ob-badge) - var(--ob-icon)) / 2);
	width: var(--ob-icon);
	height: var(--ob-icon);
	transform: translateY(-50%);
	background-color: var(--ob-glyph);
	-webkit-mask: var(--ob-arrow) no-repeat center / contain;
	mask: var(--ob-arrow) no-repeat center / contain;
}

/*
 * Branch C's glyph flows instead of being positioned, and it has to be written
 * after the rule above rather than up with branch C's other correction: same
 * weight, so load order decides and the earlier rule loses.
 *
 * `inset-inline-end` is measured from the containing block's padding edge. On A
 * and B that block is the inner row, which has no padding and is
 * `width: max-content`, so the row's trailing edge is the badge's own trailing
 * edge and `(badge - icon) / 2` lands the glyph on the badge's centre. Branch C
 * has no row, so the containing block is the button, whose padding edge sits
 * `--ob-pad-end - --ob-border` beyond the badge: the same inset pushed the arrow
 * that far towards the trailing edge, 8px at Medium and 10px at Large, which
 * Nathan measured on PR #52. Adding the padding back into the inset fixes only
 * the shrink-to-fit case: a button wider than its content centres the badge and
 * leaves a pinned glyph at the far edge, and the theme's own Call to Action skin
 * sets `width: 100%` on the button, so that case is live on the site. A and B
 * never meet it because of that `max-content` row, which C has no element for.
 *
 * So the glyph becomes a flex item. `order` puts it after the badge, a negative
 * leading margin of the gap plus half the badge plus half the icon pulls its
 * centre back onto the badge's centre, and the trailing margin gives back the
 * width that overlap removed, so the row still measures exactly one badge wide
 * and `padding-inline-end` lands where it does on A and B. The glyph then goes
 * wherever the badge goes, at any button width, because every term is a size
 * token. `position: relative` with no offsets is for the paint order alone: as
 * two in-flow items, the badge is later in tree order and would cover the glyph,
 * which is the one thing the absolute box got for free.
 *
 * `.ota-btn-badge--self` is the same drawing for a branch A button that cannot
 * carry an inner span, because a script rewrites its contents: the event Join
 * waitlist button, whose label the products extension swaps with jQuery's
 * `.text()`. See Event_Waitlist_Button. It is Circle only; the arrow modes are
 * written against the inner span and do not apply to it.
 */
.ota-btn.ota-btn-badge--self::before,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button::before {
	position: relative;
	z-index: 1;
	top: auto;
	inset-inline-end: auto;
	order: 1;
	flex: 0 0 auto;
	align-self: center;
	margin-inline-start: calc(-1 * (var(--ob-gap) + (var(--ob-badge) + var(--ob-icon)) / 2));
	margin-inline-end: calc((var(--ob-badge) - var(--ob-icon)) / 2);
	transform: none;
}

/*
 * Arrow: bare. No circle, so the glyph becomes the flex child and takes the
 * label's colour, and the padding goes back to symmetrical.
 */
.ota-btn.ota-btn-arrow--bare,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--bare .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--bare .elementor-cta__button.elementor-cta__button {
	--ob-pad-end: var(--ob-pad-inline);
}

.ota-btn.ota-btn-arrow--bare .ota-btn__inner::before,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--bare .elementor-button .elementor-button-content-wrapper::before,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--bare .elementor-cta__button.elementor-cta__button::before {
	display: none;
}

.ota-btn.ota-btn-arrow--bare .ota-btn__inner::after,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--bare .elementor-button .elementor-button-content-wrapper::after,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--bare .elementor-cta__button.elementor-cta__button::after {
	width: var(--ob-icon);
	height: var(--ob-icon);
	border-radius: 0;
	background-color: var(--ob-text);
	-webkit-mask: var(--ob-arrow) no-repeat center / contain;
	mask: var(--ob-arrow) no-repeat center / contain;
}

/* Arrow: none. */
.ota-btn.ota-btn-arrow--none,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--none .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--none .elementor-cta__button.elementor-cta__button {
	--ob-pad-end: var(--ob-pad-inline);
}

.ota-btn.ota-btn-arrow--none .ota-btn__inner::before,
.ota-btn.ota-btn-arrow--none .ota-btn__inner::after,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--none .elementor-button .elementor-button-content-wrapper::before,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--none .elementor-button .elementor-button-content-wrapper::after,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--none .elementor-cta__button.elementor-cta__button::before,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn-arrow--none .elementor-cta__button.elementor-cta__button::after {
	display: none;
}

/*
 * Focus. :focus-visible rather than :focus, so a mouse click does not leave a
 * ring behind on a button that was only pressed. The ring is a box-shadow, as
 * the design draws it, which means it does not affect layout and follows the
 * pill's radius for free.
 */
.ota-btn:focus-visible,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button:focus-visible,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--ob-focus-ring);
}

/*
 * Disabled, at the design's 45%. Elementor's Button widget has no disabled
 * concept, so this answers to the attributes a form submit actually carries
 * plus a class an editor can type into CSS Classes. `pointer-events: none`
 * is what stops the hover paint swap from firing on something inert.
 */
.ota-btn:is([disabled], [aria-disabled="true"]),
.ota-btn.ota-btn--disabled,
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button:is([disabled], [aria-disabled="true"]),
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button:is([disabled], [aria-disabled="true"]),
.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn--disabled .elementor-button,
.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost).ota-btn--disabled .elementor-cta__button.elementor-cta__button {
	opacity: 0.45;
	pointer-events: none;
}

/*
 * The one rule in the Agend theme that outranks this whole file.
 *
 * src/scss/modules/skinned/2020/_elementor.scss:3 gives any Elementor button in a
 * full width top level column 95px of side padding. Its Button branch ends on
 * `a.elementor-button-link:not(.elementor-slide-button)` and weighs 1,8,1, counting
 * the `:not()` argument; its Call to Action branch ends on `a.elementor-cta__button`
 * and weighs 1,7,1. Either is above everything else here, so an OTA button dropped
 * into a full width row came out 407px wide instead of 118px, with its label
 * floating in the middle. The pill's padding is not decoration: it is derived from
 * the height and the badge, so the design has to own it.
 *
 * The answer is to mirror the theme's own chain rather than to reach for
 * `!important`. Both selectors below land at 1,8,1, so they win exactly where the
 * theme fights and nowhere else: a tie with the theme's Button branch, settled by
 * this file loading later, and a win on weight over its lighter Call to Action
 * branch. It costs no overridability either: the theme was already above the 0,4,0
 * Elementor writes for a padding set on one widget, so padding was never
 * editor-controlled in a full width column.
 *
 * Two declarations, because the trailing padding is a token. The arrow modes and
 * branch C set `--ob-pad-end` rather than the property, so their logic does not
 * have to be repeated here.
 *
 * DESCENDANT, NOT CHILD, BETWEEN THE COLUMN AND THE BUTTON. Teamwork 49514616.
 * The theme's rule ends on a descendant combinator, so it reaches past the column
 * it names and paints every button under it however deep. This one used to stop at
 * a button sitting directly in that column, which left anything inside an embedded
 * Elementor document untouched: the member gate card arrives as
 * `[elementor-template id="2462"]`, so its buttons hang below a shortcode widget in
 * their own inner columns, four levels further down than this rule could see. The
 * theme reached them and this did not, so they came out 343px wide with the label
 * adrift in 95px of padding either side, and on a phone the pill ran off the screen.
 * Loosening the two combinators lets this follow wherever the theme goes. The
 * compound selectors are untouched, so the weights above are unchanged.
 *
 * It does go one place the theme never did, and that is deliberate. An inner section
 * inside a full width top column is a section, not a widget, so it has no
 * `.elementor-widget-container` and the theme's chain stops at it; a button in that
 * inner section kept its editor-set padding at 0,4,0. Under descendant combinators
 * this rule reaches it and the design's padding now wins there too. That is the same
 * shape as the embedded template this fixes, and the `.ota-btn--*` modifier is the
 * gate: it only fires on a button an editor has explicitly marked as an OTA pill,
 * and this file's position throughout is that the design owns a pill's geometry. A
 * button with no OTA modifier is untouched, in an inner section or anywhere else.
 */
#agendtheme-content .agendtheme-content-inner .elementor-top-column.elementor-col-100 .elementor-widget-wrap .elementor-element:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) > .elementor-widget-container a.elementor-button,
#agendtheme-content .agendtheme-content-inner .elementor-top-column.elementor-col-100 .elementor-widget-wrap .elementor-element:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) > .elementor-widget-container a.elementor-cta__button {
	padding-inline: calc(var(--ob-pad-inline) - var(--ob-border));
	padding-inline-end: calc(var(--ob-pad-end) - var(--ob-border));
}

@media (prefers-reduced-motion: reduce) {
	.ota-btn,
	.elementor-widget-button:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-button,
	.elementor-widget-call-to-action:is(.ota-btn--primary, .ota-btn--secondary, .ota-btn--outline, .ota-btn--ghost) .elementor-cta__button.elementor-cta__button {
		transition: none;
	}
}
