/* Topbar profile menu (layouts/store/partials/topbar-profile-menu.blade.php).
   RidenRoll palette: navy #0b1f3a, blue #0074D9, deep #0b4a8f; logo yellow #FFD400 only as a small accent. */
.rr-pm {
  --pm-primary: #0074D9;
  --pm-deep: #0b4a8f;
  --pm-accent: #FFD400;
  --pm-ink: #0b1f3a;
  --pm-body: #26384f;
  --pm-muted: #586a80;
  --pm-line: #e3e8ef;
  --pm-surface: #f2f5f9;
  --pm-hover: #eef3f9;
  --pm-active: #e6f0fb;
  --pm-card: #fff;
  --pm-alert: #b42318;
  --pm-alert-bg: #fdf0ef;
  --pm-ok: #1f7a4d;
  --pm-ease: cubic-bezier(.2, .8, .2, 1);
  position: relative;
  font-family: var(--rr-mega-font, "Urbanist", sans-serif);
}
.rr-pm *, .rr-pm *::before, .rr-pm *::after { box-sizing: border-box; }
.rr-pm svg { width: 18px; height: 18px; flex: 0 0 18px; }
.rr-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Theme resets: the header styles every ul/li/a/p inside .rightHead */
.top-header .rr-pm ul, .top-header .rr-pm li { display: block; float: none; width: auto; margin: 0; padding: 0; list-style: none; border: 0; background: none; }
.top-header .rr-pm li::before, .top-header .rr-pm li::after { display: none; }
.top-header .rr-pm a, .top-header .rr-pm button { text-transform: none; letter-spacing: 0; }
.top-header .rr-pm p { margin: 0; }

/* ---------- Trigger ---------- */
.rr-pm__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 190px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--pm-line);
  border-radius: 999px;
  background: var(--pm-card);
  color: var(--pm-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .2s ease, background-color .15s ease;
}
.rr-pm__trigger:hover { border-color: #c9d4e2; box-shadow: 0 6px 16px -10px rgba(11, 31, 58, .45); }
.rr-pm__trigger[aria-expanded="true"] { border-color: var(--pm-primary); box-shadow: 0 0 0 3px rgba(0, 116, 217, .14); }
.rr-pm__trigger:focus-visible { outline: 2px solid var(--pm-primary); outline-offset: 2px; }
.rr-pm__avatar {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pm-primary), var(--pm-deep));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}
.rr-pm__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* Staff: a thin logo-yellow ring on the header avatar, so an admin session is recognisable at a glance. */
.rr-pm__trigger .rr-pm__avatar.is-staff { box-shadow: 0 0 0 2px var(--pm-card), 0 0 0 3.5px var(--pm-accent); }
.rr-pm__first { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__caret { display: grid; color: var(--pm-muted); transition: transform .25s var(--pm-ease); }
.rr-pm__caret svg { width: 16px; height: 16px; flex-basis: 16px; }
.rr-pm__trigger[aria-expanded="true"] .rr-pm__caret { transform: rotate(180deg); }

/* ---------- Panel ---------- */
.rr-pm__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  padding: 8px;
  border: 1px solid var(--pm-line);
  border-radius: 20px;
  background: var(--pm-card);
  box-shadow: 0 2px 6px rgba(11, 31, 58, .06), 0 28px 56px -20px rgba(11, 31, 58, .38);
  color: var(--pm-body);
  text-align: left;
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .26s var(--pm-ease);
}
.rr-pm__panel[hidden] { display: none; }
.rr-pm.is-open .rr-pm__panel { opacity: 1; transform: none; }
/* Little notch pointing at the avatar */
.rr-pm__panel::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 26px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--pm-line);
  border-left: 1px solid var(--pm-line);
  border-radius: 3px 0 0 0;
  background: var(--pm-card);
  transform: rotate(45deg);
}
.rr-pm__grab, .rr-pm__close, .rr-pm__backdrop { display: none; }

/* Content glides in once per open (short stagger; off with reduced motion). */
.rr-pm.is-open [style*="--i"] { animation: rr-pm-in .34s var(--pm-ease) both; animation-delay: calc(var(--i, 0) * 22ms + 40ms); }
@keyframes rr-pm-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Identity card ---------- */
.rr-pm__id {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 116, 217, .55) 0%, rgba(0, 116, 217, 0) 55%), linear-gradient(150deg, #10345f 0%, var(--pm-ink) 70%);
  color: #fff;
  isolation: isolate;
}
.rr-pm__id::after { /* fine dot texture, fades out to the left */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.2px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000);
          mask-image: linear-gradient(100deg, transparent 35%, #000);
  pointer-events: none;
}
.rr-pm__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; }
/* Ring around the big avatar: profile completeness for customers, full for everyone else. */
.rr-pm__ring {
  --p: 100;
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--pm-accent) calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0);
}
.rr-pm__avatar--lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 17px; box-shadow: 0 0 0 2px #0f2c50; }
.rr-pm__who { display: grid; justify-items: start; min-width: 0; gap: 3px; flex: 1 1 auto; line-height: 1.25; }
.rr-pm__name { max-width: 100%; overflow: hidden; color: #fff; font-size: 16px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__email { max-width: 100%; overflow: hidden; color: rgba(255, 255, 255, .78); font-size: 12.5px; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__since { color: rgba(255, 255, 255, .7); font-size: 12px; }
.rr-pm__role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 3px 8px 3px 6px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rr-pm__role svg { width: 13px; height: 13px; flex-basis: 13px; }
.rr-pm__role.is-super { border-color: rgba(255, 212, 0, .55); color: var(--pm-accent); }

.rr-pm__strength {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 10px;
  margin: 0 10px 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .85) !important;
  font-size: 13px;
  text-decoration: none !important;
  transition: background-color .15s ease;
}
.rr-pm__strength:hover { background: rgba(255, 255, 255, .14); }
.rr-pm__strength:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: -2px; }
.rr-pm__strength-text b { color: var(--pm-accent); font-weight: 800; }
.rr-pm__strength-cta { display: inline-flex; align-items: center; gap: 2px; color: #fff; font-weight: 800; }
.rr-pm__strength-cta svg { width: 14px; height: 14px; flex-basis: 14px; transition: transform .2s var(--pm-ease); }
.rr-pm__strength:hover .rr-pm__strength-cta svg { transform: translate(2px, -2px); }
.rr-pm__bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.rr-pm__bar i { display: block; height: 100%; border-radius: inherit; background: var(--pm-accent); transform-origin: left; }
.rr-pm.is-open .rr-pm__bar i { animation: rr-pm-bar .8s var(--pm-ease) .15s both; }
@keyframes rr-pm-bar { from { transform: scaleX(0); } }

/* ---------- Scroll area ---------- */
.rr-pm__scroll { flex: 1 1 auto; min-height: 0; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--pm-line) transparent; }

/* Shortcut tiles */
.top-header .rr-pm .rr-pm__tiles { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.rr-pm__tile {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 1px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--pm-line);
  border-radius: 13px;
  background: var(--pm-card);
  color: var(--pm-body) !important;
  text-decoration: none !important;
  transition: border-color .15s ease, box-shadow .2s ease, transform .2s var(--pm-ease);
}
.rr-pm__tile:hover { border-color: #b8cbe2; box-shadow: 0 10px 20px -14px rgba(11, 31, 58, .5); transform: translateY(-1px); }
.rr-pm__tile:focus-visible { outline: 2px solid var(--pm-primary); outline-offset: -2px; }
.rr-pm__tile.is-current { border-color: var(--pm-primary); background: var(--pm-active); }
.rr-pm__tile-top { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; margin-bottom: 4px; }
.rr-pm__tile-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--pm-active); color: var(--pm-primary); transition: background-color .15s ease, color .15s ease; }
.rr-pm__tile:hover .rr-pm__tile-icon { background: var(--pm-primary); color: #fff; }
.rr-pm__tile-icon svg { width: 16px; height: 16px; flex-basis: 16px; }
.rr-pm__tile-go { color: var(--pm-muted); }
.rr-pm__tile-go svg { width: 14px; height: 14px; flex-basis: 14px; transition: transform .2s var(--pm-ease); }
.rr-pm__tile:hover .rr-pm__tile-go { color: var(--pm-primary); }
.rr-pm__tile:hover .rr-pm__tile-go svg { transform: translate(2px, -2px); }
.rr-pm__tile-label { max-width: 100%; overflow: hidden; color: var(--pm-muted); font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__tile-value { max-width: 100%; min-height: 18px; overflow: hidden; color: var(--pm-ink); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__tile-value--soft { color: var(--pm-ink); font-weight: 700; }
.rr-pm__tile-value.is-negative { color: var(--pm-alert); }
.rr-pm__tile-value.is-zero { color: var(--pm-ok); }
.rr-pm__tile-value small { color: var(--pm-muted); font-size: 11px; font-weight: 600; }
.rr-pm__tile-value.is-loaded { animation: rr-pm-in .3s var(--pm-ease) both; }
.rr-pm__skel { display: inline-block; width: 40px; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--pm-surface), var(--pm-line), var(--pm-surface)); background-size: 200% 100%; animation: rr-pm-skel 1.2s linear infinite; }
@keyframes rr-pm-skel { to { background-position: -200% 0; } }

/* Lists */
.top-header .rr-pm .rr-pm__label { margin: 10px 8px 4px; color: var(--pm-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.top-header .rr-pm .rr-pm__list { padding: 2px 0; }
.rr-pm__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--pm-body) !important;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
  list-style: none;
  transition: background-color .12s ease, color .12s ease;
}
.rr-pm__item::-webkit-details-marker { display: none; }
.rr-pm__item > svg { color: var(--pm-muted); transition: color .12s ease, transform .2s var(--pm-ease); }
.rr-pm__item > span { flex: 1 1 auto; min-width: 0; }
.rr-pm__item:hover, .rr-pm__item:focus-visible { background: var(--pm-hover); color: var(--pm-ink) !important; }
.rr-pm__item:hover > svg:first-child { color: var(--pm-primary); transform: translateX(1px); }
.rr-pm__item:focus-visible { outline: 2px solid var(--pm-primary); outline-offset: -2px; }
.rr-pm__item.is-current { background: var(--pm-active); color: var(--pm-ink) !important; font-weight: 700; }
.rr-pm__item.is-current > svg:first-child { color: var(--pm-primary); }
.rr-pm__item--alert > svg:first-child, .rr-pm__item--alert:hover > svg:first-child { color: var(--pm-alert); }

/* Expandable rows (vendor settings, help) */
.rr-pm__more > summary > svg:last-child { width: 16px; height: 16px; flex-basis: 16px; transition: transform .2s var(--pm-ease); }
.rr-pm__more[open] > summary > svg:last-child { transform: rotate(180deg); }
.top-header .rr-pm .rr-pm__sub { margin: 2px 0 6px 38px; padding: 0 0 0 10px; border-left: 2px solid var(--pm-line); }
.rr-pm__sub a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--pm-body) !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
}
.rr-pm__sub a:hover, .rr-pm__sub a:focus-visible { background: var(--pm-hover); color: var(--pm-ink) !important; }
.rr-pm__sub a:focus-visible { outline: 2px solid var(--pm-primary); outline-offset: -2px; }
.rr-pm__sub .is-current { color: var(--pm-primary) !important; font-weight: 800; }

/* Preferences: segmented chips, one tap to switch */
.rr-pm__prefs { display: grid; gap: 8px; margin: 6px 2px 4px; padding: 10px; border-radius: 12px; background: var(--pm-surface); }
.rr-pm__pref { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rr-pm__pref-label { display: inline-flex; align-items: center; gap: 8px; color: var(--pm-body); font-size: 13px; font-weight: 700; }
.rr-pm__pref-label svg { width: 16px; height: 16px; flex-basis: 16px; color: var(--pm-muted); }
.rr-pm__seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--pm-line); border-radius: 999px; background: var(--pm-card); }
.rr-pm__seg button {
  min-height: 28px;
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pm-body);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.rr-pm__seg button:hover { background: var(--pm-hover); color: var(--pm-ink); }
.rr-pm__seg button.is-current { background: var(--pm-ink); color: #fff; }
.rr-pm__seg button:focus-visible { outline: 2px solid var(--pm-primary); outline-offset: 1px; }
.top-header .rr-pm .rr-pm__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px; }
.rr-pm__chips a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--pm-line); border-radius: 999px; color: var(--pm-body) !important; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.rr-pm__chips a.is-current { border-color: var(--pm-primary); background: var(--pm-active); color: var(--pm-ink) !important; }

.rr-pm__foot { flex: 0 0 auto; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--pm-line); }
.rr-pm__logout:hover, .rr-pm__logout:focus-visible { background: var(--pm-alert-bg); color: var(--pm-alert) !important; }
.rr-pm__logout:hover > svg:first-child { color: var(--pm-alert); transform: translateX(2px); }

/* ---------- Profile switcher (Facebook-style) ---------- */
/* A company shows as a rounded square (people are round), with the signed-in person on its corner. */
.rr-pm__avatar.is-company { overflow: visible; border-radius: 10px; }
.rr-pm__avatar.is-company > img { border-radius: inherit; }
.rr-pm__avatar--lg.is-company { border-radius: 14px; }
.rr-pm__me {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--pm-deep);
  box-shadow: 0 0 0 2px var(--pm-card);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}
.rr-pm__me img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.rr-pm__avatar--lg .rr-pm__me { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px #0f2c50; }

.rr-pm__switch { margin: 0 0 6px; padding: 2px 2px 8px; border-bottom: 1px solid var(--pm-line); }
.top-header .rr-pm .rr-pm__switch .rr-pm__label { margin-top: 4px; }
.rr-pm__switch form { margin: 0; }
.rr-pm__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--pm-line);
  border-radius: 13px;
  background: var(--pm-card);
  color: var(--pm-body);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .2s ease, background-color .15s ease;
}
.rr-pm__profile:hover { border-color: #b8cbe2; background: var(--pm-hover); box-shadow: 0 10px 20px -14px rgba(11, 31, 58, .5); }
.rr-pm__profile:focus-visible { outline: 2px solid var(--pm-primary); outline-offset: -2px; }
.rr-pm__profile:disabled { cursor: progress; opacity: .7; }
.rr-pm__avatar--md { flex: 0 0 40px; width: 40px; height: 40px; font-size: 14px; }
.rr-pm__profile-who { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; line-height: 1.25; }
.rr-pm__profile-name { overflow: hidden; color: var(--pm-ink); font-size: 14.5px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__profile-sub { overflow: hidden; color: var(--pm-muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.rr-pm__profile-badge {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pm-accent);
  color: var(--pm-ink);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rr-pm__profile-badge[hidden] { display: none; }
.dark .rr-pm__profile-badge { color: #0b1f3a; }
.rr-pm__profile-go { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--pm-active); color: var(--pm-primary); transition: background-color .15s ease, color .15s ease, transform .25s var(--pm-ease); }
.rr-pm__profile-go svg { width: 16px; height: 16px; flex-basis: 16px; }
.rr-pm__profile:hover .rr-pm__profile-go { background: var(--pm-primary); color: #fff; transform: rotate(180deg); }

/* "Switching to …" overlay */
.rr-pm-switching {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 22, 44, .55);
  opacity: 0;
  transition: opacity .2s ease;
}
.rr-pm-switching[hidden] { display: none; }
.rr-pm-switching.is-on { opacity: 1; }
.rr-pm-switching__card {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--pm-card);
  box-shadow: 0 28px 56px -20px rgba(11, 31, 58, .5);
  color: var(--pm-ink);
  font-size: 15px;
  font-weight: 600;
}
.rr-pm-switching__card b { font-weight: 800; overflow-wrap: anywhere; }
.rr-pm-switching__spin { flex: 0 0 22px; width: 22px; height: 22px; border: 3px solid var(--pm-active); border-top-color: var(--pm-primary); border-radius: 50%; animation: rr-pm-spin .8s linear infinite; }
@keyframes rr-pm-spin { to { transform: rotate(360deg); } }

/* "You're now using …" toast */
.rr-pm-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 1990;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 8px 10px 14px;
  border-radius: 14px;
  background: var(--pm-ink, #0b1f3a);
  box-shadow: 0 18px 40px -16px rgba(11, 31, 58, .6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-50%);
  animation: rr-pm-toast .32s var(--pm-ease) both;
  transition: opacity .2s ease, transform .2s ease;
}
.rr-pm-toast > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--pm-accent); }
.rr-pm-toast > span { min-width: 0; overflow-wrap: anywhere; }
.rr-pm-toast.is-gone { opacity: 0; transform: translate(-50%, 8px); }
.rr-pm-toast__close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.rr-pm-toast__close svg { width: 16px; height: 16px; flex-basis: 16px; }
.rr-pm-toast__close:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 1px; }
@keyframes rr-pm-toast { from { opacity: 0; transform: translate(-50%, 12px); } }
.dark .rr-pm-toast { background: #16243a; }
.rr-pm.is-open .rr-pm-toast { display: none; } /* never on top of the open menu / bottom sheet */

/* ---------- Tablet / phone header ---------- */
@media (max-width: 1199px) {
  .rr-pm__trigger { max-width: 150px; font-size: 14px; }
}
@media (max-width: 767px) {
  .rr-pm__trigger { padding-right: 4px; border-color: transparent; }
  .rr-pm__first, .rr-pm__caret { display: none; }
  .rr-pm__trigger .rr-pm__avatar { flex-basis: 36px; width: 36px; height: 36px; box-shadow: 0 0 0 2px var(--pm-card), 0 0 0 3px var(--pm-line); }
  .rr-pm__trigger .rr-pm__avatar.is-staff { box-shadow: 0 0 0 2px var(--pm-card), 0 0 0 3.5px var(--pm-accent); }
  .rr-pm__panel::before { right: 14px; }
}

/* ---------- Phones: bottom sheet ---------- */
@media (max-width: 575px) {
  .rr-pm__backdrop { position: fixed; inset: 0; z-index: 1059; display: block; background: rgba(8, 22, 44, .5); opacity: 0; transition: opacity .2s ease; }
  .rr-pm__backdrop[hidden] { display: none; }
  .rr-pm.is-open .rr-pm__backdrop { opacity: 1; }
  .rr-pm__panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    padding: 6px 10px calc(10px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 22px 22px 0 0;
    transform: translateY(28px);
    transform-origin: bottom center;
  }
  .rr-pm__panel::before { display: none; }
  .rr-pm__grab { display: block; width: 40px; height: 4px; margin: 4px auto 8px; border-radius: 4px; background: var(--pm-line); }
  .rr-pm__close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
  .rr-pm__close svg { width: 18px; height: 18px; }
  .rr-pm__close:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 2px; }
  .rr-pm__item { min-height: 44px; font-size: 15px; }
  .rr-pm__sub a { min-height: 44px; }
  .rr-pm__seg button { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
}

/* RTL */
.rtl .rr-pm__panel, [dir="rtl"] .rr-pm__panel { right: auto; left: 0; transform-origin: top left; text-align: right; }
.rtl .rr-pm__panel::before { right: auto; left: 26px; }
.rtl .rr-pm__item { text-align: right; }
.rtl .rr-pm .rr-pm__sub { margin: 2px 38px 6px 0; padding: 0 10px 0 0; border-left: 0; border-right: 2px solid var(--pm-line); }
.rtl .rr-pm__logout svg, .rtl .rr-pm__tile-go svg, .rtl .rr-pm__strength-cta svg { transform: scaleX(-1); }
.rtl .rr-pm__bar i { transform-origin: right; }
@media (max-width: 575px) { .rtl .rr-pm__panel { left: 0; right: 0; } }
.rtl .rr-pm__me { right: auto; left: -4px; }
.rtl .rr-pm__profile { text-align: right; }

/* Dark theme */
.dark .rr-pm {
  --pm-ink: #eef2f8; --pm-body: #cfd8e3; --pm-muted: #9aa8ba; --pm-line: #22324a; --pm-surface: #16243a;
  --pm-hover: #182a44; --pm-active: #12345c; --pm-card: #0e1a2c; --pm-alert-bg: rgba(180, 35, 24, .18);
}
.dark .rr-pm__seg button.is-current { background: var(--pm-primary); }

@media (forced-colors: active) {
  .rr-pm__item.is-current, .rr-pm__tile.is-current, .rr-pm__seg button.is-current { outline: 2px solid Highlight; }
  .rr-pm__ring { background: CanvasText; }
}
@media print { .rr-pm { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .rr-pm *, .rr-pm *::before, .rr-pm *::after { animation: none !important; transition: none !important; }
  /* The spinner still says "working", just without spinning; the overlay and toast appear without motion. */
  .rr-pm-switching__spin { border-top-color: var(--pm-active); border-right-color: var(--pm-primary); }
}
@media print { .rr-pm-toast, .rr-pm-switching { display: none !important; } }

/* Placement in the header actions row */
.top-header.al_custom_head.custom_header .rightHead li.rr-pm-li { display: flex; align-items: center; margin: 0 0 0 12px; }
@media (max-width: 1199px) {
  .top-header.al_custom_head.custom_header .rightHead li.rr-pm-li { margin-left: 4px; }
}
