/* The share sheet (share-ui.js), rendered inside dialog.sheet. Tokens come from style.css. */
.share-sheet .share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.share-sheet .share-title { margin: 0; font-family: var(--sans); font-size: 20px; color: var(--ink); }
.share-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.share-close svg { width: 24px; height: 24px; }

.share-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--line); }
.share-tab { min-height: 44px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-family: var(--sans); font-size: 15px; font-weight: 700; cursor: pointer; }
.share-tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(35, 48, 31, .18); }

.share-stage { display: grid; place-items: center; margin-top: 12px; min-height: 240px; }
.share-card { display: block; width: auto; max-width: 100%; max-height: min(52vh, 480px); border-radius: 10px; background: var(--line); box-shadow: 0 2px 10px rgba(35, 48, 31, .18); }
.share-card[aria-busy="true"] { min-width: 180px; min-height: 225px; }
.share-video { display: grid; justify-items: center; gap: 12px; width: 100%; }
.share-movie { display: block; max-width: 100%; max-height: min(52vh, 480px); aspect-ratio: 9 / 16; border-radius: 10px; background: var(--ink); cursor: pointer; }
.share-make-box { display: grid; justify-items: center; gap: 12px; width: 100%; padding: 28px 0; }
.share-make { min-height: 52px; padding: 0 28px; border: 0; border-radius: 12px; background: var(--yellow); color: var(--ink); font-family: var(--sans); font-size: 17px; font-weight: 800; box-shadow: 0 3px 0 #c5a039; cursor: pointer; }
.share-make:active { transform: translateY(2px); box-shadow: 0 1px 0 #c5a039; }
.share-progress { width: min(280px, 80%); height: 10px; overflow: hidden; border-radius: 5px; background: var(--line); }
.share-progress span { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .2s linear; }
.share-sheet [hidden] { display: none !important; }

.share-status { min-height: 1.5em; margin: 10px 0 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.share-manual { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 16px; resize: none; }

.share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); font-family: var(--sans); font-size: 16px; font-weight: 700; cursor: pointer; }
.share-btn svg { width: 22px; height: 22px; flex: none; }
.share-btn.primary { background: var(--accent); color: #fff; box-shadow: none; }
.share-btn.wide { grid-column: 1 / -1; }
.share-btn:disabled { opacity: .45; cursor: default; }

.share-close:focus-visible, .share-tab:focus-visible, .share-make:focus-visible, .share-btn:focus-visible, .share-movie:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .share-progress span { transition: none; } }
@media (max-height: 640px) { .share-card, .share-movie { max-height: 40vh; } .share-stage { min-height: 180px; } }
