/* share.css · styles for share.js: the Share button, its menu, and the Save as PDF button beside it. One popover style
   for the whole app: the menu matches the Save-to-report picker in saved.css (paper, hairline, the 22px shadow, the sheet
   radius, the same spring in). Salvaged from Wells's Oct 14 round; the export button added for the PDF export (Oct 15).
   Every class is ds-share- or ds-export-prefixed. Phone rules at the end. */

/* ---------- the buttons: flat secondaries, 36px, hairline ---------- */
html[data-skin] body .ds-btn.ds-share-btn, html[data-skin] body .ds-btn.ds-export-btn { height: 36px; padding: 0 14px 0 12px; gap: 7px; font-size: var(--ds-fs-3); cursor: default; }
.ds-share-btn svg, .ds-export-btn svg { width: 15px; height: 15px; flex: none; }
.ds-share-btn[aria-expanded="true"] { border-color: var(--ds-blue); background: var(--ds-wash); }
/* while the server makes the file, and for a moment once it has */
.ds-export-btn[aria-busy="true"] { opacity: .72; pointer-events: none; }
.ds-export-btn[aria-busy="true"] svg { animation: ds-export-pulse 1s ease-in-out infinite; }
.ds-export-btn.done { color: var(--ds-teal); border-color: var(--ds-teal); }
@keyframes ds-export-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* light on dark, on a report's cover and inside the project hero */
.ds-rep-acts .ds-share-btn[aria-expanded="true"] { background: rgba(6, 13, 28, .85); border-color: #fff; }
.ds-rep-acts .ds-export-btn.done { color: #fff; border-color: #fff; }
html[data-skin] body .ds-phero2 .ds-btn.ds-share-btn { border-color: rgba(255, 255, 255, .28); background: transparent; color: #fff; }
html[data-skin] body .ds-phero2 .ds-btn.ds-share-btn:hover, html[data-skin] body .ds-phero2 .ds-btn.ds-share-btn[aria-expanded="true"] { background: rgba(143, 176, 240, .12); border-color: rgba(255, 255, 255, .5); }
html[data-skin] body .ds-phero2 .ds-btn.ds-share-btn:focus-visible { outline-color: #fff; }

/* ---------- the menu ---------- */
.ds-share-menu { position: fixed; z-index: 75; padding: 14px 6px 6px; border-radius: var(--ds-r-sheet); background: var(--ds-paper); border: 1px solid var(--ds-line); box-shadow: 0 22px 48px -18px rgba(6, 13, 28, .35); color: var(--ds-ink); }
body:not(.ds-still) .ds-share-menu.in { animation: ds-share-in .3s cubic-bezier(.34, 1.56, .64, 1); transform-origin: top left; }
body:not(.ds-still) .ds-share-menu.in.above { transform-origin: bottom left; }
@keyframes ds-share-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.ds-share-h { margin: 0; padding: 0 10px; font-size: var(--ds-fs-5); font-weight: 700; color: var(--ds-ink); }
.ds-share-s { margin: 0; padding: 2px 10px 10px; font-size: var(--ds-fs-3); color: var(--ds-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-share-h + .ds-share-l { margin-top: 10px; }
.ds-share-l { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.ds-share-l button { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border-radius: var(--ds-r-key); text-align: left; color: var(--ds-ink); font-size: var(--ds-fs-4); font-weight: 600; cursor: default; transition: background .15s, color .15s; }
.ds-share-l button:hover { background: var(--ds-tint); }
.ds-share-l button:focus-visible { outline: none; background: var(--ds-wash); box-shadow: inset 0 0 0 1.5px var(--ds-blue); }
.ds-share-ic { display: grid; place-items: center; width: 16px; height: 16px; color: var(--ds-muted); }
.ds-share-ic svg { width: 16px; height: 16px; }
.ds-share-l button:hover .ds-share-ic { color: var(--ds-ink); }
.ds-share-l button.done { color: var(--ds-teal); }
.ds-share-l button.done .ds-share-ic { color: var(--ds-teal); }
.ds-share-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the quiet link rows at the bottom: where the shared thing leads, and the viewer's exports */
.ds-share-gos { display: flex; flex-wrap: wrap; gap: 0 4px; margin-top: 4px; }
.ds-share-go { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px; padding: 6px; border-radius: var(--ds-r-key); font-size: var(--ds-fs-3); font-weight: 600; color: var(--ds-blue); text-decoration: none; cursor: default; }
.ds-share-go svg { width: 13px; height: 13px; }
.ds-share-go:hover { background: var(--ds-tint); }
.ds-share-go:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--ds-blue); }

/* ---------- motion off ---------- */
body.ds-still .ds-share-l button, body.ds-still .ds-share-btn, body.ds-still .ds-export-btn { transition: none; }
body.ds-still .ds-export-btn[aria-busy="true"] svg { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .ds-share-menu.in { animation: none; }
  .ds-share-l button, .ds-share-btn, .ds-export-btn { transition: none; }
  .ds-export-btn[aria-busy="true"] svg { animation: none; }
}

/* ---------- print: the buttons are not part of the page ---------- */
@media print { .ds-share-btn, .ds-export-btn, .ds-share-menu { display: none !important; } }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  html[data-skin] body .ds-btn.ds-share-btn, html[data-skin] body .ds-btn.ds-export-btn { height: 40px; }   /* a 44px-ish tap target with its hairline */
  .ds-share-l button { height: 44px; }
}
