/* The widget block: what the ForthTap widget does, in four steps (js/widget.js). Its text, backdrop, panel
   and pointer come from story.css. Approved prototype: work/widget-proto/v2-approved-20261125.html */

.wg-page { position: absolute; inset: 0; visibility: hidden; color: #d6d6d6; font-size: calc(36 * var(--u)); line-height: 1; }
.wg-page.is-on { visibility: visible; }

/* the sheets behind it: the panel is the first copy, so three settings show two; with All two more melt away */
.wg-fan { position: absolute; inset: 0; --fade: radial-gradient(ellipse calc(430 * var(--u)) calc(330 * var(--u)) at calc(70 * var(--u)) calc(52 * var(--u)), #000 38%, transparent 100%);
  -webkit-mask: var(--fade); mask: var(--fade); }
.wg-sheet { --st: calc(16 * var(--u)); bottom: 0; height: auto; visibility: hidden; background: hsl(0 0% calc(31% + var(--n) * 5%));
  transition: transform 0.75s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0s 0.75s; }
@supports (width: round(1px, 1px)) { .wg-sheet { --st: round(16 * var(--u), 1px); } }
.wg-sheet.is-on { visibility: visible; transform: translate(calc(var(--n) * -1 * var(--st)), calc(var(--n) * -1 * var(--st))); transition: transform 0.75s cubic-bezier(0.25, 0.8, 0.25, 1); }
.wg-sheet.is-far { opacity: 0; transition: transform 0.75s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s, visibility 0s 0.75s; }
.wg-fan.is-all .wg-sheet.is-far.is-on { opacity: var(--o); transition: transform 0.75s cubic-bezier(0.25, 0.8, 0.25, 1) 0.12s, opacity 0.5s 0.3s; }

/* Lightroom's sliders; what is copied: the names get a soft glow, and with a few edits the other rows go dim */
.wg-page .lrq-label { text-shadow: 0 calc(2 * var(--u)) calc(2.5 * var(--u)) #0009, 0 0 calc(4 * var(--u)) #fff0; transition: color 0.7s ease, text-shadow 0.7s ease; }
.wg-edits .lrq > * { transition: opacity 0.5s; }
.wg-edits.is-copied .lrq > * { opacity: 0.2; }
.wg-edits.is-copied .lrq > .is-on { opacity: 1; }
.wg-all.is-copied .lrq-label, .wg-edits.is-copied .is-on .lrq-label { color: #fff; text-shadow: 0 calc(2 * var(--u)) calc(2.5 * var(--u)) #0000, 0 0 calc(20 * var(--u)) #ffffff80; }

/* the two windows of the app */
.wg-window { padding: calc(26 * var(--u)) calc(30 * var(--u)); }
.wg-window h4 { margin: calc(8 * var(--u)) calc(20 * var(--u)) calc(16 * var(--u)); font-size: calc(37 * var(--u)); line-height: 1; font-weight: 600; letter-spacing: normal; color: #f2f2f2; }
.wg-window p { display: flex; align-items: center; gap: calc(24 * var(--u)); height: calc(82 * var(--u)); margin: 0; padding: 0 calc(20 * var(--u));
  border-radius: calc(14 * var(--u)); font-size: calc(40 * var(--u)); line-height: 1; color: inherit; }
.wg-window p span { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }
.wg-list p { transition: background-color 0.32s ease; }
.wg-list p.is-lit { background: #ffffff1f; }
.wg-exclusions p { transition: color 0.4s, opacity 0.4s; }
.wg-exclusions i { width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: calc(9 * var(--u)); background: #6a6a6a; color: #fff;
  font: 700 calc(28 * var(--u)) / calc(40 * var(--u)) -apple-system, sans-serif; text-align: center; transition: 0.2s; }
.wg-exclusions .is-checked i { background: #0a6cdf; }
.wg-exclusions .is-checked i::before { content: "✓"; }
.wg-exclusions p:not(.is-checked) { color: #9b9b9b; }
.wg-exclusions.is-copied .is-checked { color: #fff; }
.wg-exclusions.is-copied p:not(.is-checked) { opacity: 0.45; }

/* the widget, in the app's own proportions; its size never changes */
.wg-widget { position: absolute; left: calc(950 * var(--u)); top: calc(725 * var(--u)); transform: translate(-50%, -50%) scale(0.64);
  display: flex; align-items: center; gap: calc(11.5 * var(--u)); padding: calc(23 * var(--u)); border-radius: calc(50 * var(--u));
  background: #1f1f1ff7; box-shadow: inset 0 0 0 calc(2 * var(--u)) #fff3, 0 calc(30 * var(--u)) calc(70 * var(--u)) rgba(var(--shade), 0.42); }
.wg-grip { position: relative; width: calc(38.3 * var(--u)); height: calc(161 * var(--u)); }
.wg-grip::before { content: ""; position: absolute; left: calc(7.7 * var(--u)); top: calc(50% - 13.4 * var(--u)); width: calc(23 * var(--u)); height: calc(3.8 * var(--u));
  border-radius: calc(2 * var(--u)); background: #ffffffbf; box-shadow: 0 calc(11.5 * var(--u)) #ffffffbf, 0 calc(23 * var(--u)) #ffffffbf; }
.wg-button { width: calc(153 * var(--u)); height: calc(153 * var(--u)); border-radius: calc(34 * var(--u)); background: #fff1; transition: 0.12s; }
.wg-button.is-down { background: #fff4; transform: scale(0.94); }
.wg-button svg { display: block; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.7; }
.wg-button text { font: 700 9px ui-rounded, -apple-system, sans-serif; fill: #fff; stroke: none; text-anchor: middle; }
.wg-num { transform-origin: 22px 24px; }
.wg-button.is-pop .wg-num { animation: wg-pop 0.3s; }
.wg-spin { animation: wg-spin 0.8s steps(8) infinite; }
@keyframes wg-pop { 40% { transform: scale(1.4); } }
@keyframes wg-spin { to { transform: rotate(360deg); } }

/* the message after a sync (the look of Quick Sync's, lrq.css), and the widget quiet meanwhile */
.wg-widget { transition: opacity 0.4s ease; }
.wg-widget.is-quiet { opacity: 0.4; }
