/* "Share {name}'s big moment" (js/share-card.mjs): a grown-up button on the lesson celebration of a big first, and the
   grown-up sheet outside the stage. Grown-up words and buttons in teacher green, our greens only, no purple. */

/* the button: bottom-right corner of the celebration (1600x900 stage px), away from the child's "Back to the map" */
.reward-lesson .sc-offer { position: absolute; right: 34px; bottom: 30px; z-index: 8; display: inline-flex; align-items: center; gap: 14px;
  height: 78px; padding: 0 30px 0 12px; border-radius: 39px; background: #FFFFFF; color: var(--adult, #3E8044);
  font: 700 29px/1 var(--font-ui); box-shadow: 0 6px 0 rgba(20, 52, 36, .22), 0 0 0 4px var(--adult, #3E8044) inset;
  animation: scOfferIn .45s cubic-bezier(.2, 1.4, .4, 1) .2s both; }
.sc-offer-i { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--adult, #3E8044); color: #FFFFFF; font-size: 30px; }
.sc-offer-i svg { display: block; }
.reward-lesson .sc-offer:active { translate: 0 4px; box-shadow: 0 2px 0 rgba(20, 52, 36, .22), 0 0 0 4px var(--adult, #3E8044) inset; }
@keyframes scOfferIn { from { opacity: 0; transform: translateY(40px) scale(.9); } }

/* the sheet: a real page overlay (not inside the scaled stage), so phones get normal-size text and a press-and-hold
   on the picture can save it (the stage turns that menu off for the child) */
.sc-sheet { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; box-sizing: border-box;
  background: rgba(6, 34, 20, .64); font-family: var(--font-ui); color: #1E3A2C; touch-action: manipulation; overflow-y: auto; }
.sc-sheet * { touch-action: manipulation; }
.sc-card { position: relative; width: min(100%, 760px); box-sizing: border-box; padding: 22px 24px 20px; border-radius: 24px; background: #FFFFFF;
  border-top: 10px solid var(--adult, #3E8044); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); max-height: calc(100dvh - 32px); overflow-y: auto; }
.sc-card h2 { margin: 0 44px 14px 0; font-size: 26px; line-height: 1.2; color: var(--adult, #3E8044); }
.sc-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: #EEF8F0; color: #1E3A2C; font-size: 30px; line-height: 1; }
.sc-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.sc-pic { position: relative; aspect-ratio: 1080 / 1350; border-radius: 16px; overflow: hidden; background: #EEF8F0; box-shadow: 0 0 0 2px #B9DCC5; }
.sc-preview { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; }
.sc-preview:not([src]) { visibility: hidden; }
.sc-wait { position: absolute; inset: 0; display: none; place-items: center; font-size: 16px; font-weight: 700; color: var(--adult, #3E8044); }
.sc-sheet.busy .sc-wait { display: grid; background: rgba(238, 248, 240, .7); }
.sc-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sc-row { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #1E3A2C; cursor: pointer; }
.sc-row input { width: 24px; height: 24px; accent-color: var(--adult, #3E8044); }
.sc-pro { display: flex; gap: 8px; }
.sc-pro[hidden] { display: none; }
.sc-pro button { min-width: 64px; height: 40px; padding: 0 14px; border-radius: 20px; background: #EEF8F0; color: #1E3A2C; font-size: 17px; font-weight: 700; box-shadow: 0 0 0 2px #B9DCC5 inset; }
.sc-pro button[aria-pressed="true"] { background: var(--adult, #3E8044); color: #FFFFFF; box-shadow: none; }
.sc-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 58px; padding: 0 26px; border-radius: 29px;
  background: var(--adult, #3E8044); color: #FFFFFF; font-size: 21px; font-weight: 700; box-shadow: 0 5px 0 rgba(20, 52, 36, .25); }
.sc-go svg { width: 24px; height: 24px; }
.sc-go[disabled] { opacity: .55; }
.sc-go:active { translate: 0 3px; box-shadow: 0 2px 0 rgba(20, 52, 36, .25); }
.sc-note { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--adult, #3E8044); }
.sc-small { margin: -6px 0 0; font-size: 14px; line-height: 1.45; color: #2B6B33; }
.sc-never { align-self: flex-start; padding: 6px 0; font-size: 15px; font-weight: 700; color: #3E8044; text-decoration: underline; text-underline-offset: 3px; }
.sc-sheet button:focus-visible { outline: 3px solid #22B46A; outline-offset: 3px; }
@media (max-width: 560px) {
  .sc-body { grid-template-columns: 1fr; }
  .sc-pic { width: min(100%, 240px); justify-self: center; }
  .sc-card h2 { font-size: 22px; }
}
.reward-lesson .sc-offer:focus-visible { outline-color: #22B46A; }
/* phones held sideways (the app's usual way): the picture sizes to the height so everything fits without scrolling */
@media (max-height: 560px) and (min-width: 561px) {
  .sc-card { padding: 14px 18px 12px; border-top-width: 8px; }
  .sc-card h2 { margin-bottom: 10px; font-size: 20px; }
  .sc-x { top: 8px; right: 8px; width: 38px; height: 38px; font-size: 26px; }
  .sc-body { grid-template-columns: minmax(0, min(300px, calc((100dvh - 110px) * .8))) minmax(0, 1fr); gap: 16px; }
  .sc-side { gap: 9px; }
  .sc-row { font-size: 16px; }
  .sc-pro button { height: 34px; font-size: 15px; }
  .sc-go { height: 48px; font-size: 18px; }
  .sc-note { font-size: 14px; }
  .sc-small { margin-top: -4px; font-size: 12px; }
  .sc-never { padding: 2px 0; font-size: 13px; }
}
