/*
 * TAG Legal Desk v2.1, J154 (29 Sep 2026): the Director's Atelier in the Canteen (js\v21_atelier_shop.js).
 * Each Atelier item stands on the Canteen's shop shelf as a product (J167): an atmosphere or a trail in a small light
 * box, a surface, a board surround, a card motion, a cursor, a click effect, a brush or a bump power on the velvet
 * cushion, all from the engine's own previews (styles\v21_atelier_fx.css draws inside them). Here: how each sits on
 * the shelf, the power meter, the kind tag before the name, the favourite star and the Favourites filter.
 * Light, Dark, High contrast and forced colours; still under reduced motion; hidden in print. No inline style.
 */

/* ======================================================================= the products on the shelf */

.v21atl-prod { position: relative; display: block; width: 100%; height: 100%; pointer-events: none; }
.v21atl-prod > .v21atl-pv { height: 100%; }
/* On the cushion (cursor, click effect, brush, surface, card motion, bump power): the preview has no box of its own. */
.v21atl-prod:is([data-atl-kind="cursor"], [data-atl-kind="click"], [data-atl-kind="brush"], [data-atl-kind="surface"], [data-atl-kind="interface"], [data-atl-kind="collision"]) > .v21atl-pv { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.v21pr-stage:is([data-kind="cursors"], [data-kind="clicks"], [data-kind="brushes"]) .v21pr-item { bottom: 22%; height: 70%; width: 70%; }
.v21pr-stage:is([data-kind="surfaces"], [data-kind="interface"]) .v21pr-item { bottom: 24%; height: 68%; width: 86%; }
.v21pr-stage[data-kind="bumps"] .v21pr-item { bottom: 23%; height: 68%; width: 92%; }
.v21atl-prod[data-atl-kind="surface"] .v21atl-material-mini { width: 78%; min-height: 0; height: 72%; }

/* In a light box (atmosphere, trail, board surround): no cushion, a slim bezel round the picture. */
.v21pr-stage:is([data-kind="atmospheres"], [data-kind="trails"], [data-kind="boards"]) .v21pr-cushion { display: none; }
.v21pr-stage:is([data-kind="atmospheres"], [data-kind="trails"], [data-kind="boards"]) .v21pr-item { bottom: 14%; height: 76%; width: 86%; }
.v21atl-prod:is([data-atl-kind="atmosphere"], [data-atl-kind="trail"], [data-atl-kind="board"]) > .v21atl-pv {
  border-radius: 8px; box-shadow: 0 0 0 3px var(--v21atl-bezel), 0 6px 14px rgba(20, 34, 26, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.v21atl-prod { --v21atl-bezel: #2B3A31; }
:root[data-theme="dark"] .v21atl-prod { --v21atl-bezel: #0B100D; }
.v21atl-prod[data-atl-kind="atmosphere"] .v21atl-pv-label { font-size: .8125rem; }

/* The power meter (a bump power): the file's own meter, a little bigger on the shelf, the tier's colour stronger. */
.v21atl-prod[data-atl-kind="collision"] .v21atl-knockback { grid-template-columns: 22px minmax(0, 1fr) 22px; width: 100%; gap: 8px; }
.v21atl-prod[data-atl-kind="collision"] .v21atl-bump-track { height: 8px; box-shadow: inset 0 0 0 1px var(--glass-rim, rgba(34, 58, 43, .22)); }
.v21atl-prod[data-atl-kind="collision"] .v21atl-bump-track i { background: linear-gradient(90deg, var(--brand-text, #233D26), var(--accent, #88A9A7)); }
.v21atl-prod[data-atl-kind="collision"] .v21atl-bump-pointer .v21atl-icon { width: 22px; height: 22px; }
.v21atl-prod[data-atl-kind="collision"] .v21atl-knockback small { margin-top: 6px; letter-spacing: 1px; }

/* ======================================================================= the card: kind tag, star, words */

.v21atl-kind { display: inline-block; margin-right: 2px; padding: 0 6px; border-radius: 999px; vertical-align: 1px; font-size: .6875rem; line-height: 1.125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-text, #233D26); background: var(--brand-soft, rgba(44, 66, 48, .08)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-text, #233D26) 30%, transparent); }
[data-atl-deco] .v21sd-b > .v21sd-name, [data-atl-deco] .v21c-item-b > h4 { padding-right: 40px; }
.v21atl-fav { justify-self: end; align-self: flex-end; margin: -34px -2px 0 0; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--glass-edge, rgba(34, 58, 43, .2)); background: var(--glass-1, #FFFFFF); color: var(--ink-2, #526253); box-shadow: inset 0 1px 0 var(--glass-hi, rgba(255, 255, 255, .6)); }
.v21atl-fav .v21atl-star { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.v21atl-fav[aria-pressed="true"] { color: #8A5A00; border-color: #8A5A00; background: #FFF6DC; }
.v21atl-fav[aria-pressed="true"] .v21atl-star { fill: #E7B53C; }
:root[data-theme="dark"] .v21atl-fav[aria-pressed="true"] { color: #F2CB4C; border-color: #F2CB4C; background: #2A2413; }
.v21atl-fav:hover { border-color: var(--brand-text, #233D26); }
.v21atl-fav:focus-visible { outline: 3px solid var(--focus, #1F6FEB); outline-offset: 2px; }
.v21atl-mass, .v21atl-owned { margin: 0; font-size: .8125rem; line-height: 1.125rem; }
.v21atl-tag { justify-self: start; }
.v21atl-favchip .v21sd-chip-n { min-width: 22px; }
.v21atl-favnone { margin: 8px 0 0; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="reduced"]):not([data-calm="on"]) .v21atl-fav { transition: transform .12s ease, background-color .12s ease; }
  :root:not([data-motion="reduced"]):not([data-calm="on"]) .v21atl-fav:active { transform: scale(.92); }
}

/* ======================================================================= High contrast, forced colours, print */

:root[data-theme="high_contrast"] .v21atl-prod { --v21atl-bezel: #000000; }
:root[data-theme="high_contrast"] .v21atl-prod > .v21atl-pv { background: #FFFFFF; box-shadow: 0 0 0 2px #000000; border-radius: 4px; }
:root[data-theme="high_contrast"] .v21atl-prod[data-atl-kind="collision"] .v21atl-bump-track i { background: #000000; }
:root[data-theme="high_contrast"] .v21atl-kind { color: #000000; background: #FFFFFF; box-shadow: inset 0 0 0 2px #000000; }
:root[data-theme="high_contrast"] .v21atl-fav { color: #000000; background: #FFFFFF; border: 2px solid #000000; box-shadow: none; }
:root[data-theme="high_contrast"] .v21atl-fav[aria-pressed="true"] { color: #FFFFFF; background: #000000; border-color: #000000; }
:root[data-theme="high_contrast"] .v21atl-fav[aria-pressed="true"] .v21atl-star { fill: #FFFFFF; }
@media (forced-colors: active) {
  .v21atl-prod > .v21atl-pv { forced-color-adjust: none; background: Canvas; border: 1px solid CanvasText; box-shadow: none; }
  .v21atl-kind { forced-color-adjust: none; color: CanvasText; background: Canvas; box-shadow: none; border: 1px solid CanvasText; }
  .v21atl-fav { border: 1px solid ButtonText; color: ButtonText; background: ButtonFace; }
  .v21atl-fav[aria-pressed="true"] { border-width: 3px; }
  .v21atl-fav[aria-pressed="true"] .v21atl-star { fill: ButtonText; }
  .v21atl-prod[data-atl-kind="collision"] .v21atl-bump-track i { background: CanvasText; }
}
:root[data-motion="reduced"] .v21atl-fav { transition: none !important; transform: none !important; }
@media print { .v21atl-prod, .v21atl-fav { display: none !important; } }
