/* Optional visitor photo tool, confined to the opened work AR panel. */
.wg-photo-ar { margin-top: 1rem; border-top: 1px solid var(--wg-line); padding-top: .8rem; max-width: 36rem; }
.wg-photo-ar summary { cursor: pointer; font-size: .875rem; }
.wg-photo-ar-body { padding-top: .6rem; font-size: .875rem; }
.wg-photo-ar-note { font-size: .8rem; line-height: 1.55; opacity: .8; }
.wg-photo-ar-body label { display: block; }
.wg-photo-ar-body input[type="file"] { width: 100%; max-width: 100%; margin: .4rem 0 .8rem; }
.wg-photo-preview { display: block; max-width: 100%; max-height: 15rem; width: auto; height: auto; object-fit: contain; margin: .5rem 0 1rem; }
.wg-photo-dimensions { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; }
.wg-photo-dimensions input { display: block; width: 8rem; padding: .4rem; margin-top: .3rem; color: inherit; background: transparent; border: 1px solid var(--wg-line); }
.wg-photo-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.wg-photo-actions button { color: inherit; background: transparent; border: 1px solid var(--wg-line); padding: .55rem .75rem; font: inherit; cursor: pointer; }
.wg-photo-actions button:disabled { opacity: .5; cursor: default; }
.wg-photo-ar [hidden] { display: none !important; }
.wg-photo-model { position: fixed; left: -9999px; top: 0; width: 320px; height: 320px; pointer-events: none; }

.wg-ar { min-width: 0; width: 100%; --wg-line: #b7b7b2; font-size: .9rem; max-width: 38rem; }
.wg-ar [hidden] { display: none !important; }
.wg-ar-button { display: inline-flex; align-items: center; gap: .45rem; padding: .15rem 0; color: inherit; background: transparent; border: 0; font: inherit; cursor: pointer; text-align: left; }
.wg-ar-button:hover { text-decoration: underline; text-underline-offset: .2em; }
.wg-ar button:focus-visible, .wg-ar input:focus-visible, .wg-ar a:focus-visible, .wg-ar summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wg-ar-hint, .wg-ar-note { font-size: .82rem; line-height: 1.5; margin: .3rem 0 .8rem; }
.wg-ar-panel { padding: .8rem 0; }
.wg-ar-panel > label { display: block; }
.wg-ar-panel [data-ar-width] { display: block; width: 8rem; color: inherit; background: transparent; border: 1px solid var(--wg-line); padding: .45rem; font: inherit; margin-top: .4rem; }
.wg-ar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.wg-ar-actions button { color: inherit; background: transparent; border: 1px solid var(--wg-line); padding: .55rem .75rem; font: inherit; cursor: pointer; }
.wg-ar-actions button:disabled { opacity: .5; cursor: default; }
.wg-ar-qr { margin-block: 1rem; }
.wg-ar-qr a { display: block; overflow-wrap: anywhere; font-size: .8rem; margin-top: .5rem; }
.wg-ar-qr > div { background: white; padding: 12px; width: max-content; }
.wg-ar-qr img { display: block; }

.wg-ar .wg-ar-button { white-space: normal; line-height: 1.4; }

/* Direct work launch restored from 0.7.28; accepted 0.7.29 appearance retained. */
.wg-ar-spinner { width: .8em; height: .8em; border: 1.5px solid currentColor; border-top-color: transparent; border-radius: 50%; display: inline-block; flex-shrink: 0; animation: wg-ar-spin .7s linear infinite; }
@keyframes wg-ar-spin { to { transform: rotate(360deg); } }
.wg-ar-button:disabled { opacity: .5; cursor: wait; }
.wg-ar-debug { padding: .5rem; font: .75rem/1.5 monospace; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(127,127,127,.1); }
@media (prefers-reduced-motion: reduce) { .wg-ar-spinner { animation: none; } }
