/* Sharing a Home card (owner, 2026-11-30, variant 4 + B of https://claude.ai/artifact/LcxCMD5XCPCcnCBvcJ7hNL;
   SP_HOME_SHARE; pages/home/cards.share_button / share_panel, assets/home_share.js). Dash loads this file on every
   page, so every rule starts with the Home root .sp-home-hub (tests/test_home_share.py checks it), as in zz_home.css.

   The button: an icon at the card's bottom right. In the first card and the map it stands at the end of the row that
   already ends the card (beside Explore / Compare in Explore); elsewhere in a row of its own under the content. The
   negative margins put the icon's own edge on the card's content edge; the press area is 44 px. */
.sp-home-hub .hh-share { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: inherit; }
.sp-home-hub .hh-share::before { content: ""; position: absolute; inset: -2px; }
.sp-home-hub .hh-share-i { display: block; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='6' r='3'/%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3Cpath d='M8.7 10.7l6.6-3.4M8.7 13.3l6.6 3.4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='6' r='3'/%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3Cpath d='M8.7 10.7l6.6-3.4M8.7 13.3l6.6 3.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.sp-home-hub .hh-share-end { display: flex; justify-content: flex-end; margin: 4px -9px -9px 0; }
/* the first card's foot: the counting rule takes the free room, Explore and the icon stand together at the right */
.sp-home-hub .hh-lfoot .hh-foot { flex: 1 1 auto; }
.sp-home-hub .hh-lfoot .hh-share { align-self: flex-end; margin: 0 -9px -4px -8px; }
.sp-home-hub .hh-mi .hh-share { margin: 0 -9px 0 auto; }

/* The panel: a sheet from the bottom on a phone, a box in the middle from 700 px. It sits inside the Home root, so the
   Home's colours (and the light mode's) and its face reach it. */
.sp-home-hub .hh-share-panel { width: min(100vw, 430px); max-width: 100vw; max-height: 92dvh; margin: auto auto 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); overflow: auto; border: 0; background: var(--hh-paper); color: var(--hh-pi); box-shadow: 0 -2px 0 var(--hh-rim); }
.sp-home-hub .hh-share-panel::backdrop { background: rgba(0, 0, 0, .62); }
@media (min-width: 700px) {
  .sp-home-hub .hh-share-panel { margin: auto; padding-bottom: 16px; box-shadow: inset 0 0 0 2px var(--hh-rim), 8px 8px 0 var(--hh-k); }
}
.sp-home-hub .hh-sp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sp-home-hub .hh-sp-top h2 { font-stretch: 62%; font-weight: 900; font-size: 26px; line-height: 1; }
/* the cross of the box score (.hh-box-x) */
.sp-home-hub .hh-sp-x { position: relative; flex: none; width: 36px; height: 36px; color: var(--hh-pi); box-shadow: inset 0 0 0 2px currentColor; background: linear-gradient(45deg, transparent calc(50% - 1px), currentColor 0 calc(50% + 1px), transparent 0) center / 16px 16px no-repeat, linear-gradient(-45deg, transparent calc(50% - 1px), currentColor 0 calc(50% + 1px), transparent 0) center / 16px 16px no-repeat; }
.sp-home-hub .hh-sp-x::before { content: ""; position: absolute; inset: -4px; }
.sp-home-hub .hh-sp-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: start; }
.sp-home-hub .hh-sp-pic { display: grid; place-items: center; width: 132px; height: 235px; overflow: hidden; background: var(--hh-k); box-shadow: inset 0 0 0 2px var(--hh-rim); }
.sp-home-hub .hh-sp-img { display: block; max-width: 100%; max-height: 100%; }
.sp-home-hub .hh-sp-wait { padding: 0 12px; font-size: 12px; text-align: center; color: var(--hh-muted); }
.sp-home-hub .hh-sp-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* Story 9:16 | Card: the period buttons of the first card */
.sp-home-hub .hh-sp-formats { display: flex; }
.sp-home-hub .hh-sp-formats button { flex: 1 1 0; height: 34px; background: var(--hh-k); color: var(--hh-kink); border: 2px solid var(--hh-edge); margin-left: -2px; font-stretch: 75%; font-weight: 800; font-size: 15px; white-space: nowrap; }
.sp-home-hub .hh-sp-formats button:first-child { margin-left: 0; }
.sp-home-hub .hh-sp-formats button.on { background: var(--hh-sel); color: var(--hh-selink); }
.sp-home-hub .hh-sp-main { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; background: var(--hh-tape); color: var(--hh-tapeink); box-shadow: 4px 4px 0 var(--hh-k); font-stretch: 75%; font-weight: 900; font-size: 19px; }
.sp-home-hub .hh-sp-main .hh-share-i { width: 20px; height: 20px; }
.sp-home-hub .hh-sp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sp-home-hub .hh-sp-row button { height: 40px; padding: 0 4px; box-shadow: inset 0 0 0 2px currentColor; font-weight: 700; font-size: 13px; }
/* a browser that cannot pass a picture on: the big button saves it, the small one would say the same */
.sp-home-hub .hh-share-panel.hh-sp--save .hh-sp-row { grid-template-columns: minmax(0, 1fr); }
.sp-home-hub .hh-share-panel.hh-sp--save [data-do="save"] { display: none; }
.sp-home-hub .hh-share-panel.hh-sp--save .hh-sp-main .hh-share-i { display: none; }
.sp-home-hub .hh-share-panel button:disabled { opacity: .45; cursor: default; }
.sp-home-hub .hh-sp-note { min-height: 17px; margin-top: 12px; font-size: 12px; color: var(--hh-muted); }
.sp-home-hub .hh-sp-note:empty { display: none; }
