/* Studio v2 (plan F6): the rules of WP-C, the scan panel and the outline. Shared tokens stay in studio.css. */

/* the panel under the nav (views/scanpanel.js): what Scan coin found, in place, on the page the person is on */
#scanpanel { max-width: 1100px; margin: 0 auto; padding: 12px 20px 0; }
#scanpanel[hidden] { display: none; }
.scanpanel { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 44px 12px 16px; background: var(--panel);
  border: 1px solid var(--rule); border-left: 3px solid var(--warn); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.scanpanel .sp-body { flex: 1; min-width: 0; }
.scanpanel .scan-choose { padding: 0; border: 0; box-shadow: none; background: none; }
.sp-head { margin: 0; overflow-wrap: anywhere; }
.sp-body > p.small { margin: 6px 0 0; color: var(--ink2); max-width: 72ch; }
.sp-acts, .scanpanel .acts { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.sp-acts:empty { display: none; }
.sp-close { position: absolute; top: 6px; right: 8px; min-width: 32px; min-height: 32px; font-size: 20px; line-height: 1; text-decoration: none; }
.scanpanel a.button, .scan-notice a.button, .scan-offline a.button { display: inline-block; padding: 7px 14px; border-radius: 8px; background: var(--ink);
  color: var(--panel); text-decoration: none; }
.scanpanel a.button:hover, .scan-notice a.button:hover { background: color-mix(in srgb, var(--ink) 84%, var(--panel)); }
.scan-notice .sp-body .acts { margin-top: 8px; }
@media (max-width: 640px) { #scanpanel { padding: 10px 16px 0; } }

/* the coin page's blocker (offlineBlockHtml): one line, the help link beside it */
.scan-offline { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 8px 0 0; padding: 8px 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--warn) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--rule)); overflow-wrap: anywhere; }

/* the outline editor (views/outline.js): one large picture cropped to the coin, one Confirm edge, the rest under
   Diagnostics. The picture is placed under the crop by inline left/top/width/height, the svg's viewBox is the crop */
.ol-pic img.ol-crop { position: absolute; max-width: none; max-height: none; object-fit: fill; }
.ol-pic[data-crop] { max-height: none; }
.ol-acts { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; }
.ol-acts button.big { min-height: 44px; }
.ol-how { color: var(--ink2); }
.ol-diag { margin: 12px 0 0; border-top: 1px solid var(--rule); padding-top: 8px; }
.ol-diag > summary { cursor: pointer; color: var(--ink2); font-size: 13.5px; min-height: 32px; display: flex; align-items: center; }
.ol-diag[open] > summary { margin-bottom: 4px; }
.ol-diag .ol-cap button.link { margin-left: 6px; }

/* the scan level (views/scanlevel.js): Standard, Presentation, Showcase while the coin is checked in the chamber, then
   the level it is lit at as a chip. Showcase is disabled on the 3 A supply ("Needs the 27 W supply") */
#scan-level:empty { display: none; }
.scan-level { margin: 10px 0 0; padding: 12px 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); }
.scan-level.done { padding: 0; border: 0; background: none; }
.sl-head { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.sl-opts { display: grid; gap: 8px; }
.sl-opt { display: grid; gap: 2px; text-align: left; width: 100%; padding: 9px 12px; min-height: 44px; border-radius: 8px; background: var(--panel);
  color: var(--ink); border: 1px solid var(--rule); font: inherit; cursor: pointer; }
.sl-opt:hover:not(:disabled) { border-color: var(--ink2); }
.sl-opt.on { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); background: color-mix(in srgb, var(--focus) 10%, var(--panel)); }
.sl-opt:disabled { cursor: not-allowed; opacity: .62; }
.sl-buys { font-size: 13.5px; color: var(--ink2); overflow-wrap: anywhere; }
.sl-needs { color: var(--warn); }
.sl-line { margin: 0; }
.sl-note { margin: 8px 0 0; color: var(--ink2); }
