/*
 * Mashin Irani — Collision guard: hello-elementor's typed-button skin.
 *
 * Same job as the four guards in themes/mashin-irani/assets/css/chrome-fix.css: this is NOT a design
 * change, it re-asserts the frozen mockup's own values against a parent-theme override that leaks in.
 * Kept in the sandbox (rather than folded into chrome-fix.css) for two reasons: it has to ship behind a
 * preview gate, and — unlike chrome-fix — it must load at a SPECIFIC point in the cascade (see below),
 * which chrome-fix's priority-100 slot cannot provide.
 *
 * THE COLLISION
 * hello-elementor/assets/css/reset.css (and reset-rtl.css) ships an opinionated button skin:
 *   [type=button],[type=submit],button{
 *     background-color:transparent; border:1px solid #c36; border-radius:3px; color:#c36;
 *     padding:.5rem 1rem; display:inline-block; font-size:1rem; font-weight:400;
 *     text-align:center; transition:all .3s; user-select:none; white-space:nowrap }
 *   [type=button]:focus,[type=button]:hover,[type=submit]:focus,[type=submit]:hover,
 *   button:focus,button:hover{ background-color:#c36; color:#fff }
 * It loads AFTER the frozen page CSS, whose base rule
 *   button{font-family:inherit;cursor:pointer;border:0;background:none;color:inherit}
 * carries the same (0,0,1) specificity and therefore loses on source order. novamira-sandbox/
 * mirani-home-fixes.css only re-COLOURS the magenta (#c36 -> navy #0E1D3B), so the 1px box, the 3px
 * radius and the .5rem/1rem padding survived on every bare <button> site-wide. The padding is the
 * damaging half: on fixed-size icon buttons the 16px inline padding crushes the icon (measured:
 * .gal-zoom rendered 40x40 with a 0x0 <svg> inside; the qty stepper drew an 18px icon at 10px until
 * mirani-product.css patched `.stepper button` narrowly).
 *
 * WHY LOAD POSITION, NOT !important, DOES THE WORK
 * A selector list has a per-selector specificity, and reset.css matches buttons two different ways:
 *   - <button> with no type attribute (81 of ~100 buttons here): only the `button` arm matches, (0,0,1)
 *   - <button type="button|submit">: the `[type=...]` arms match, at (0,1,0)
 * Beating the (0,1,0) arm needs (0,1,0), which also ties every single-class component rule
 * (.mi-hs__dot, .mi-finder__clear, .mi-railnav ...) — so a guard loaded LAST would out-order those
 * components and strip their real styling. Measured: doing exactly that flattened the hero-slider dots
 * from 40x10 to 40x2 and stripped the gold fill off .mi-hs__nav.
 *
 * The fix is to sit in the one slot where the cascade separates the two cases for us. This sheet is
 * enqueued at priority 11 — immediately after hello's reset (default 10) and BEFORE every component
 * stylesheet (theme chrome-fix 100, all novamira-sandbox sheets 20..221, Elementor's post CSS). So:
 *   - vs reset.css  -> we load later, ties go to us .......... the guard applies
 *   - vs components -> they load later, ties go to them ...... their styling is untouched
 * The only rules we can still out-order are in the FROZEN theme CSS, which loads before the reset; the
 * one family there that declares these properties at (0,1,0) is .btn, excluded below.
 *
 * No !important anywhere. mirani-product.css's narrow `.stepper button` fix is now redundant but
 * harmless — it re-asserts the same three values at higher specificity.
 */

/* ---- Tier 1 — bare <button>: restore the frozen base rule -------------------------------- */
button {
	border: 0;
	border-radius: 0;
	padding: 0;
	background: none;
	color: inherit;
	font-family: inherit;
	cursor: pointer;
}

/* reset's hover/focus wash, re-coloured navy by mirani-home-fixes.css, is (0,1,1); matched here so a
   bare button no longer fills on hover. Any real `.class:hover` is (0,2,0) and still wins. */
button:focus,
button:hover {
	background: none;
	color: inherit;
}

/* ---- Tier 2 — <button type="..."> : same restoration at the reset's attribute weight ------
 * .btn is excluded because it lives in the frozen theme CSS, which loads BEFORE this sheet — it is the
 * one family whose own (0,1,0) declarations we would otherwise out-order. :where() contributes ZERO
 * specificity, so the exclusion keeps these selectors at exactly (0,1,0). */
[type="button"]:not(:where(.btn)),
[type="submit"]:not(:where(.btn)),
[type="reset"]:not(:where(.btn)) {
	border: 0;
	border-radius: 0;
	padding: 0;
	background: none;
	color: inherit;
}

[type="button"]:not(:where(.btn)):focus,
[type="button"]:not(:where(.btn)):hover,
[type="submit"]:not(:where(.btn)):focus,
[type="submit"]:not(:where(.btn)):hover,
[type="reset"]:not(:where(.btn)):focus,
[type="reset"]:not(:where(.btn)):hover {
	background: none;
	color: inherit;
}

/* ---- Tier 3 — typed .btn: re-assert the two frozen values the reset out-orders ------------
 * .btn{border-radius:var(--radius-md)} is (0,1,0) in the frozen theme CSS and reset's [type=...] arm
 * ties it and wins on order, so a TYPED .btn (the header CTA #ctaFreeOctane, the wholesale CTA) renders
 * 3px corners and a stray 1px box. No .btn-* variant overrides the radius, so restoring the token here
 * at (0,2,0) is exact. .btn-outline is the one variant that legitimately draws a border. */
[type="button"].btn,
[type="submit"].btn,
[type="reset"].btn {
	border-radius: var(--radius-md);
}

[type="button"].btn:not(:where(.btn-outline)),
[type="submit"].btn:not(:where(.btn-outline)),
[type="reset"].btn:not(:where(.btn-outline)) {
	border: 0;
}

/* Same collision on the size modifier: .btn-lg{padding:var(--space-4) var(--space-8)} is (0,1,0) in the
 * frozen theme CSS, so reset's attribute arm ties it and wins on order — the wholesale submit CTA
 * (<button type="submit" class="btn btn-buy btn-lg btn-block">) renders at .5rem/1rem instead of the
 * token. Restored at (0,2,0). This is safe against the hero slider, whose own `.mi-hs .btn-lg` override
 * is also (0,2,0) but lives in mirani-hero-slider.css (priority 100) and therefore loads later and
 * still wins — including its responsive variant. Only .btn-lg is restored: the base .btn padding is not
 * out-ordered anywhere measured, and re-asserting it at (0,2,0) would clobber the frozen theme's own
 * (0,2,0) `.wholesale-link .btn` and `.hdr .cta-hdr .btn` overrides. */
[type="button"].btn-lg,
[type="submit"].btn-lg,
[type="reset"].btn-lg {
	padding: var(--space-4) var(--space-8);
}
