/* Shared button geometry. CSS points scale with the display pixel density.
   Important declarations in this layer precede legacy unlayered overrides. */
@layer button-system {
  :root {
    --button-border-width: 1pt;
    --button-hover-radius: 50px;
  }

  :is(button, input[type="button"], input[type="submit"], input[type="reset"],
      [role="button"], a.btn, a[class^="btn-"], a[class*=" btn-"],
      a[class$="-btn"], a[class*="-btn "], a.button,
      a[class$="-button"], a[class*="-button "]):not(.open-panel-menu, .product-badge) {
    box-sizing: border-box !important;
    border-width: var(--button-border-width) !important;
    transition: border-radius 350ms cubic-bezier(0.4, 0, 0.2, 1),
                background-color 200ms ease, border-color 200ms ease,
                color 200ms ease, box-shadow 200ms ease,
                transform 200ms ease, opacity 200ms ease !important;
  }

  :is(button, input[type="button"], input[type="submit"], input[type="reset"],
      [role="button"], a.btn, a[class^="btn-"], a[class*=" btn-"],
      a[class$="-btn"], a[class*="-btn "], a.button,
      a[class$="-button"], a[class*="-button "]):not(.open-panel-menu, .product-badge,
      .reviews-item, .pdp-thumb, .fsv-dropdown, .dropdown-toggle, .language-toggle-btn,
      [aria-haspopup="listbox"], [aria-haspopup="menu"], [aria-haspopup="true"],
      .vehicle-generation-option, .filter-tag, .pdp-option-more,
      .pdp-cart-minus, .pdp-cart-plus):is(:hover, :focus-visible) {
    border-radius: var(--button-hover-radius) !important;
  }

  .product-catalog-page .filter-sort-view .fsv-right :is(.btn-grid, .btn-list) {
    transition: border-radius 650ms cubic-bezier(0.22, 1, 0.36, 1),
                color 180ms ease, border-color 180ms ease,
                box-shadow 180ms ease !important;
  }

  .product-catalog-page .filter-sort-view .fsv-right .btn-grid:is(:hover, :focus-visible) {
    border-radius: var(--button-hover-radius) 0 0 var(--button-hover-radius) !important;
  }

  .product-catalog-page .filter-sort-view .fsv-right .btn-list:is(:hover, :focus-visible) {
    border-radius: 0 var(--button-hover-radius) var(--button-hover-radius) 0 !important;
  }

  @media (prefers-reduced-motion: reduce) {
    :is(button, input[type="button"], input[type="submit"], input[type="reset"],
        [role="button"], a.btn, a[class^="btn-"], a[class*=" btn-"],
        a[class$="-btn"], a[class*="-btn "], a.button,
        a[class$="-button"], a[class*="-button "]):not(.open-panel-menu, .product-badge) {
      transition: none !important;
    }

    .product-catalog-page .filter-sort-view .fsv-right :is(.btn-grid, .btn-list) {
      transition: none !important;
    }
  }
}

/* Show a hand cursor for interactive controls throughout the storefront. */
a[href]:not([aria-disabled="true"]),
button:not(:disabled):not([aria-disabled="true"]),
input:is([type="button"], [type="submit"], [type="reset"], [type="checkbox"], [type="radio"]):not(:disabled),
select:not(:disabled),
summary,
label[for],
[role="button"]:not([aria-disabled="true"]),
[role="link"]:not([aria-disabled="true"]),
[role="tab"]:not([aria-disabled="true"]),
[role="option"]:not([aria-disabled="true"]),
[onclick]:not(:disabled):not([aria-disabled="true"]) {
  cursor: pointer;
}
