/* Pitch callouts (present.js). Everything here is scoped to elements the script adds,
   or to html.s3-present, which only exists when the callouts are on. Same look as the
   Patient Hub's callouts (s3-aesthetics-hub/present.css): charcoal, clay, Montserrat and Figtree. */
:root {
  --pc-bg: #23262b;
  --pc-accent: #b0613f;
  --pc-eyebrow: #f0dfcc;
  --pc-font: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  --pc-serif: 'Montserrat', 'Figtree', -apple-system, sans-serif;
  --pc-w: clamp(320px, calc(100vw - 840px), 400px);
}

/* ── The card: floats over the map's right side, under the search bar ── */
#presentCard {
  position: fixed;
  top: var(--pc-top, 140px);
  right: 28px;
  width: var(--pc-w);
  max-height: calc(100vh - var(--pc-top, 140px) - 92px);
  z-index: 1200;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--pc-bg);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 24px 60px rgba(35, 38, 43, .35);
  color: #fff;
  font-family: var(--pc-font);
  -webkit-font-smoothing: antialiased;
  transition: opacity .3s ease, visibility .3s ease;
}
#presentCard[hidden] { display: none; }
/* Nothing on screen to point at: the card steps aside */
#presentCard.idle { opacity: 0; visibility: hidden; pointer-events: none; }
#presentCard .pc-body-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 28px 28px 8px; transition: opacity .3s ease; }
#presentCard:not(.in) .pc-body-wrap { opacity: 0; }
#presentCard .pc-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pc-eyebrow); }
#presentCard .pc-title { margin: 10px 0 16px; font-family: var(--pc-serif); font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
#presentCard .pc-items { list-style: none; margin: 0; padding: 0; }
#presentCard .pc-items li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 12px 10px; margin: 0 -10px; border-top: 1px solid rgba(255, 255, 255, .09); border-radius: 10px; cursor: pointer; transition: background .2s ease; }
#presentCard .pc-items li.focus { background: rgba(255, 255, 255, .07); border-top-color: transparent; }
#presentCard .pc-items li.focus + li { border-top-color: transparent; }
#presentCard .pc-num,
#presentMarkers .pm { width: 28px; height: 28px; border-radius: 50%; background: var(--pc-accent); color: #fff; font: 700 13px/28px var(--pc-font); text-align: center; }
#presentCard .pc-head { font-size: 16px; font-weight: 600; line-height: 1.3; }
#presentCard .pc-text { margin-top: 3px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .72); }
#presentCard .pc-nav { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; border-top: 1px solid rgba(255, 255, 255, .09); }
#presentCard .pc-step { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
#presentCard .pc-step:hover:not(:disabled) { background: var(--pc-accent); border-color: var(--pc-accent); }
#presentCard .pc-step:disabled { opacity: .3; cursor: default; }
#presentCard .pc-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#presentCard .pc-pos { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; color: rgba(255, 255, 255, .6); }
#presentCard .pc-foot { flex-shrink: 0; padding: 0 28px 16px; font-size: 11px; letter-spacing: .06em; color: rgba(255, 255, 255, .38); }

/* ── Markers: flat numbered labels with a thin white outline so they read on dark buttons and pins ── */
#presentMarkers { position: fixed; inset: 0; pointer-events: none; z-index: 1150; overflow: hidden; }
#presentMarkers[hidden] { display: none; }
#presentMarkers .pm { position: absolute; left: 0; top: 0; width: 24px; height: 24px; font-size: 12px; line-height: 21px; box-sizing: border-box; border: 1.5px solid #fff; box-shadow: 0 2px 6px rgba(35, 38, 43, .3); transition: transform .25s ease; animation: pm-in .3s ease both; }
#presentMarkers .pm.focus { box-shadow: 0 0 0 3px var(--pc-eyebrow), 0 2px 8px rgba(35, 38, 43, .4); }
#presentMarkers .pm::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--pc-accent); opacity: 0; }
#presentMarkers .pm.pulse::after { animation: pm-pulse 1.1s ease-out var(--pd, 0ms) 3; }
@keyframes pm-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-pulse { 0% { opacity: .8; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.9); } }

/* The card sits over the map's zoom buttons; scroll and pinch still zoom */
html.s3-present .leaflet-control-zoom { display: none; }

/* ── Corner toggle: charcoal pill when on, quiet white pill when off; clear of the footer ── */
#presentToggle { position: fixed; right: 28px; bottom: 44px; z-index: 1250; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: var(--pc-bg); color: #fff; font: 600 12px/1 var(--pc-font); letter-spacing: .02em; box-shadow: 0 8px 24px rgba(35, 38, 43, .25); cursor: pointer; opacity: .9; }
#presentToggle:hover { opacity: 1; }
#presentToggle .pt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc-accent); }
#presentToggle.off { background: var(--surface, #fff); color: var(--ink, var(--pc-bg)); border-color: var(--border, #e7e3de); }
#presentToggle.off .pt-dot { background: #c4c0bb; }

/* Desktop only: the finder's panel, list and map need the room on smaller screens */
@media (max-width: 1129px) {
  #presentCard, #presentMarkers, #presentToggle { display: none !important; }
  html.s3-present .leaflet-control-zoom { display: block; }
}

/* Dark theme: the charcoal card would sit flush on the dark page, so it gets a visible edge */
:root[data-theme="dark"] #presentCard, :root[data-theme="dark"] #presentToggle:not(.off) { border-color: rgba(255, 255, 255, .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #presentCard, :root:not([data-theme="light"]) #presentToggle:not(.off) { border-color: rgba(255, 255, 255, .16); } }
