/* Rite Maps Tools: the floating LinkedIn button (includes/linkedin.php, BUILD-CONTRACT.md v10).
   A round button stacked just above the chat button (ritemaps-chat's .rmc-launcher: 54px tall, 24px from the corner; on phones
   a 58px circle 16px from the corner), the same white, border and shadow. Same layer as the chat button (64): above the sticky
   header, below the chat panel, the cookie notice and the quote pop-up. Theme tokens with the same values as fallbacks. */
.rmt-li-float {
  --rmt-li-gap: 24px;       /* the chat button's distance from the corner */
  --rmt-li-size: 54px;      /* the chat button's height */
  --rmt-li-inset: 0px;      /* centres it over a round chat button on phones */
  --rmt-li-lift: 66px;      /* chat button height + 12px */
  --rmt-li-offset: 0px;     /* the cookie bar's height while it shows (phones and tablets) */
  position: fixed; z-index: 64;
  right: calc(var(--rmt-li-gap) + var(--rmt-li-inset));
  bottom: calc(var(--rmt-li-gap) + var(--rmt-li-offset) + var(--rmt-li-lift));
  display: grid; place-items: center; box-sizing: border-box;
  width: var(--rmt-li-size); height: var(--rmt-li-size); padding: 0; border-radius: 50%;
  border: 1px solid var(--rm-tint-line, #cfd9e6); background: var(--rm-white, #ffffff);
  box-shadow: 0 12px 32px rgba(5, 53, 126, .18), 0 2px 6px rgba(17, 24, 39, .08);
  text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, box-shadow .15s ease, bottom .2s ease, right .2s ease;
}
.rmt-li-float:hover { background: var(--rm-tint, #eaf0f8); box-shadow: 0 14px 36px rgba(5, 53, 126, .24), 0 2px 6px rgba(17, 24, 39, .08); }
/* Logo blue, as on the chat button (11.6:1 on white). The radius is restated because the theme's :focus-visible squares corners. */
.rmt-li-float:focus-visible { outline: 2px solid var(--rm-blue, #05357e); outline-offset: 2px; border-radius: 50%; }
.rmt-li-float .rm-linkedin__icon { display: block; width: 26px; height: 26px; }
.rmt-li-float__text {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* No chat button on the page: take its place in the corner. */
html:not(:has(#rmc-launcher)) .rmt-li-float { --rmt-li-lift: 0px; }
/* The chat is open: its panel opens over this spot, so the button moves beside the panel, down in the chat button's row
   (the panel is min(400px, 100vw - 48px) wide, 24px from the edge). On phones the chat is a full-screen sheet with this
   button in its header instead (ritemaps-chat), so this one steps aside there (below). */
html:has(.rmc[data-state="open"]) .rmt-li-float {
  --rmt-li-lift: 0px;
  right: calc(var(--rmt-li-gap) + min(400px, 100vw - 2 * var(--rmt-li-gap)) + 12px);
}
/* Out of the way while the phone menu is open. */
html:has(.rm-header.is-open) .rmt-li-float { display: none; }

/* Phones and tablets: above the cookie bar while it shows, as the chat button does. */
@media (max-width: 900px) {
  .rmt-li-float { --rmt-li-offset: var(--rm-cookie-offset, 0px); }
}
/* Phones: the chat button is a 58px circle 16px from the corner; this one is 52px, centred above it. */
@media (max-width: 600px) {
  .rmt-li-float { --rmt-li-gap: 16px; --rmt-li-size: 52px; --rmt-li-inset: 3px; --rmt-li-lift: 70px; }
  html:has(.rmc[data-state="open"]) .rmt-li-float { display: none; }
}

@media (forced-colors: active) { .rmt-li-float { border: 1px solid CanvasText; } }
@media (prefers-reduced-motion: reduce) { .rmt-li-float { transition: none; } }
@media print { .rmt-li-float { display: none !important; } }
