/* Floating account pill ("M" / your initial) on phones (<= 640px) only (m12 update 12). Tablet and desktop are untouched.
   - smaller (44px circle instead of 64 x 56), safe-area aware;
   - sits 10px above the Search / Saved / Compare bar where that bar exists, otherwise in the corner (it used to float
     88px up on every page, over the footer text of pages without the bar);
   - the page gets bottom padding so its last lines can scroll clear of the floating controls;
   - site.js hides it while you scroll down (reading) and brings it back when you scroll up or reach the top. */
@media (max-width: 640px) {
  html body :is(.motorit-home-account-access-v1, .motorit-seller-access-nav-v1) {
    right: calc(10px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
  }
  html body:has(.motorit-buyer-shortlist-nav) :is(.motorit-home-account-access-v1, .motorit-seller-access-nav-v1) {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body :is(.motorit-home-account-toggle-v1, .motorit-seller-access-toggle-v1) {
    gap: 0 !important; min-height: 44px !important; padding: 3px !important;
  }
  html body :is(.motorit-home-account-toggle-v1, .motorit-seller-access-toggle-v1) span { display: none !important; }
  html body :is(.motorit-home-account-toggle-v1, .motorit-seller-access-toggle-v1) b { width: 36px !important; height: 36px !important; font-size: 13px !important; }
  html body :is(.motorit-home-account-badge-v1, .motorit-seller-access-badge-v1) { right: -6px !important; top: -6px !important; min-width: 20px !important; height: 20px !important; font-size: 10px !important; }
  html body :is(.motorit-home-account-menu-v1, .motorit-seller-access-menu-v1) { bottom: 54px !important; width: min(286px, calc(100vw - 24px)) !important; }
  html body :is(.motorit-home-account-access-v1, .motorit-seller-access-nav-v1).is-scroll-hidden:not(.is-open):not(:focus-within) {
    opacity: 0 !important; transform: translateY(12px) !important; pointer-events: none !important;
  }
  html body:has(.motorit-buyer-shortlist-nav) { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
  html body:has(:is(.motorit-home-account-access-v1, .motorit-seller-access-nav-v1)):not(:has(.motorit-buyer-shortlist-nav)) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  html body :is(.motorit-home-account-access-v1, .motorit-seller-access-nav-v1) { transition: none !important; }
}
