/* Scope overrides to local presentation components; keep native handlers intact. */
.fx-study-icon { width:20px; height:20px; flex:none; vertical-align:middle; }
.fx-study-label-icon { display:inline-flex; align-items:center; margin-inline-end:7px; vertical-align:middle; }
.fx-proxy-tabs [data-tab], .fx-detail-tabs [data-detail] { display:inline-flex; align-items:center; justify-content:center; }
.fx-study-timestamp { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-block-start:6px; font-size:12px; color:var(--fx-muted,#697586); }
.fx-study-timestamp .fx-icon { width:16px; height:16px; }
.fx-study-timestamp time { font-variant-numeric:tabular-nums; }
.fx-session-dialog time { display:inline-block; font-variant-numeric:tabular-nums; overflow-wrap:normal; }
body #root .links-buttons .buttons-qr.fx-study-link {
  display:grid; grid-template-columns:64px minmax(0,1fr) 56px; width:100%; max-width:520px !important;
  min-width:0; gap:0; padding:0; margin:0; overflow:hidden;
  border:1px solid var(--study-link-color); border-radius:14px;
  background:var(--fx-surface,var(--bg-secondary,#fff));
}
body #root .fx-study-link .fx-link-png { display:flex; align-items:center; justify-content:center; padding:8px; background:var(--study-link-color); }
body #root .fx-study-link .fx-link-png img { display:block; width:44px; height:44px; object-fit:contain; background:#fff; border-radius:9px; padding:3px; box-sizing:border-box; }
body #root .links-buttons .buttons-qr.fx-study-link :is(.btn-link,.qr-btn) {
  width:100%; max-width:none; min-width:0; min-height:64px; height:auto; margin:0; padding:12px; border:0; border-radius:0;
  background:var(--study-link-color) !important; color:var(--study-link-ink) !important; box-shadow:none;
}
body #root .links-buttons .buttons-qr.fx-study-link .btn-link { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; text-align:start; overflow-wrap:anywhere; font-weight:650; font-size:14px; }
body #root .links-buttons .buttons-qr.fx-study-link .btn-link::after { color:inherit !important; opacity:.9; font-size:11px; }
body #root .links-buttons .buttons-qr.fx-study-link .qr-btn { display:grid; place-items:center; border-inline-start:1px solid color-mix(in srgb,var(--study-link-ink) 25%,transparent); }
body #root .links-buttons .buttons-qr.fx-study-link .qr-btn :is(svg,path,rect) { fill:none !important; color:inherit !important; stroke:currentColor; }
body #root .links-buttons .buttons-qr.fx-study-link :is(.btn-link,.qr-btn):hover { background:var(--study-link-color) !important; filter:brightness(.92); }
@media (max-width:600px) {
  body #root .links-buttons .buttons-qr.fx-study-link { grid-template-columns:54px minmax(0,1fr) 48px; }
  body #root .fx-study-link .fx-link-png img { width:38px; height:38px; }
  .fx-proxy-tabs [data-tab] { gap:4px; }
  .fx-proxy-tabs .fx-study-label-icon { margin-inline-end:2px; }
  .fx-study-timestamp time { max-width:100%; }
}
@media (max-width:480px) {
  .foxy-ui .fx-session-dialog .fx-detail-tabs [data-detail] { flex-direction:column; gap:6px; padding:10px 4px; min-width:0; font-size:12px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
  .foxy-ui .fx-session-dialog .fx-detail-tabs .fx-study-label-icon { margin:0; }
}

body #root .fx-link-group .links-buttons:has(.fx-study-link) { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; }
body #root .divider > span:has(.fx-study-label-icon) { display:inline-flex; align-items:center; }
body .fx-study-icon, body .fx-study-icon * { fill:none !important; }
html body.foxy-ui #root .red-btn svg.fx-study-icon * { fill:none !important; stroke:currentColor; }

/* Admin-only local appearance editor, contained within Settings > Buttons. */
html[data-foxy-design=legacy] #root .spoiler-container:has(> .spoiler-header .spoiler-arrow-up):has(.fx-appearance-admin) > .spoiler-content { height:auto !important; }
html body #root .fx-appearance-admin {
  display:block; min-width:0; max-width:100%; margin:0 0 24px; padding:20px;
  border:1px solid var(--fx-line,#a5aab2); border-radius:16px; box-sizing:border-box;
  color:var(--fx-text,var(--text-primary,#20252b)); background:var(--fx-surface,var(--bg-secondary,#fff));
}
html body #root .fx-appearance-admin h3 { margin:0 0 8px; font-size:20px; line-height:1.35; overflow-wrap:anywhere; }
html body #root .fx-appearance-admin p { margin:8px 0 16px; font-size:13px; line-height:1.5; color:var(--fx-muted,var(--text-secondary,#637080)); overflow-wrap:anywhere; }
html body #root .fx-appearance-admin label { display:flex; flex-direction:column; align-items:stretch; gap:8px; text-align:start; min-width:0; width:auto; margin:0; font-size:13px; line-height:1.4; }
html body #root .fx-appearance-admin :is(input,select,button) {
  box-sizing:border-box; min-width:0; max-width:100%; width:100%; min-height:44px; height:auto;
  margin:0; padding:10px 12px; border:1px solid var(--fx-line,#a5aab2); border-radius:10px;
  background:var(--fx-subtle,var(--bg-primary,#f3f5f7)); color:var(--fx-text,var(--text-primary,#20252b)); font:inherit;
  white-space:normal; word-break:normal; overflow-wrap:anywhere; line-height:1.4;
}
html body #root .fx-appearance-admin select { text-overflow:ellipsis; padding-inline-end:32px; white-space:nowrap; }
html body #root .fx-appearance-admin .fx-select-control { width:100%; min-width:0; margin:0; }
html body #root .fx-appearance-admin .fx-select-value { white-space:normal; overflow:visible; text-overflow:clip; }
html body #root .fx-appearance-selectors { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:16px; margin:20px 0; }
html body #root .fx-appearance-fields { display:grid; grid-template-columns:80px minmax(0,220px); gap:12px; margin:20px 0; }
html body #root .fx-appearance-admin input[type=color] { padding:4px; height:44px; }
html body #root .fx-appearance-preview { display:grid; grid-template-columns:64px minmax(0,1fr) 56px; max-width:520px; min-width:0; align-items:center; border-radius:12px; overflow:hidden; background:var(--study-link-color); color:var(--study-link-ink); }
html body #root .fx-appearance-preview img { width:44px; height:44px; object-fit:contain; margin:10px; background:white; border-radius:8px; }
html body #root .fx-appearance-preview strong { min-width:0; overflow-wrap:anywhere; text-align:start; padding:10px; }
html body #root .fx-appearance-preview > span { display:grid; place-items:center; align-self:stretch; border-inline-start:1px solid color-mix(in srgb,var(--study-link-ink) 25%,transparent); }
html body #root .fx-appearance-upload, html body #root .fx-appearance-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
html body #root .fx-appearance-upload > *, html body #root .fx-appearance-actions > * { flex:1 1 180px; }
html body #root .fx-appearance-admin .fx-appearance-file { position:relative; display:flex; align-items:center; justify-content:center; min-height:44px; box-sizing:border-box; padding:10px 12px; border:1px solid var(--fx-line,#a5aab2); border-radius:10px; cursor:pointer; font-weight:600; }
html body #root .fx-appearance-file input { position:absolute; inset:0; opacity:0; cursor:pointer; }
html body #root .fx-appearance-file:focus-within, html body #root .fx-appearance-admin :is(button,select,input):focus-visible { outline:3px solid var(--fx-accent,#ff8b19); outline-offset:2px; }
html body #root .fx-appearance-admin [data-appearance-save] { background:var(--fx-accent,#ff8b19); color:#17191c; font-weight:700; border-color:transparent; }
html body #root .fx-appearance-admin [aria-invalid=true] { border-color:#ed6680; }
html body #root .fx-appearance-admin button:disabled { opacity:.5; cursor:default; }
html body #root .fx-appearance-admin [role=status] { margin-bottom:0; }
html body #root .fx-appearance-admin [role=status]:empty { display:none; }
@media(max-width:600px) {
  html body #root .fx-appearance-admin { padding:14px; }
  html body #root .fx-appearance-selectors { grid-template-columns:minmax(0,1fr); }
  html body #root .fx-appearance-preview { grid-template-columns:54px minmax(0,1fr) 44px; }
  html body #root .fx-appearance-preview img { width:36px; height:36px; margin:9px; }
}

/* Session list: created date under the address, as in the study stand. */.foxy-ui .fx-session-created { margin-block-start:12px; }.foxy-ui .fx-session-created-label { display:block; font-size:12px; line-height:1.5; color:var(--fx-muted); }.foxy-ui .fx-session-created .fx-study-timestamp { display:flex; align-items:flex-start; flex-wrap:nowrap; gap:8px; margin-block-start:4px; color:var(--fx-text); font-size:14px; line-height:1.5; }.foxy-ui .fx-session-created .fx-icon { flex:none; margin-block-start:2px; color:var(--fx-muted); }.foxy-ui .fx-session-created time { min-width:0; overflow-wrap:normal; word-break:normal; unicode-bidi:plaintext; }
@media(max-width:650px) { .foxy-ui .fx-session-row .fx-session-name { grid-column:1/-1; } .foxy-ui .fx-session-row>.fx-icon-button { justify-self:end; } .foxy-ui .fx-session-table .fx-table-head>span:nth-child(2) { display:none; } }

/* The native archived modal also needs the artwork, not only the study gallery. */
/* The native archived modal also needs the artwork, not only the study gallery. */
body .zb-modal [data-foxy-data-glyph] { display:inline-flex; align-items:center; gap:8px; min-width:0; }
body .zb-modal .zb-data-type[data-foxy-data-glyph] { color:var(--fx-accent-ink); overflow-wrap:anywhere; }
body .zb-modal [data-foxy-data-glyph] > .fx-modal-glyph { display:block; flex:none; width:22px; height:22px; pointer-events:none; }
body .zb-modal [data-foxy-data-glyph] > .fx-modal-glyph,
body .zb-modal [data-foxy-data-glyph] > .fx-modal-glyph * { color:inherit !important; fill:none !important; stroke:currentColor !important; }
body .zb-modal [data-foxy-data-glyph] > .fx-modal-glyph .fx-glyph-wash,
body .zb-modal [data-foxy-data-glyph] > .fx-modal-glyph .fx-glyph-wash * { fill:currentColor !important; stroke:none !important; opacity:.12; }
body .zb-modal .zb-refresh-btn[data-foxy-data-glyph] { justify-content:center; min-height:42px; white-space:normal; }
body .zb-modal .zb-data-item-header { flex-wrap:wrap; gap:8px 16px; }
body .zb-modal .zb-data-time { margin-inline-start:auto; }
body .zb-modal .zb-data-item-body { overflow-wrap:anywhere; min-width:0; }
body .zb-modal :is(.zb-data-item-body,.zb-fp-row,.zb-fp-label,.zb-fp-value) { word-break:normal; overflow-wrap:anywhere; }
body .zb-command-icon[data-foxy-glyph] {
  display:grid; place-items:center; flex:none; width:52px; height:52px;
  margin:0; padding:9px; box-sizing:border-box; border-radius:15px;
  color:var(--fx-accent-ink,var(--accent-primary,#ff8a1f));
  background:var(--fx-tint,rgba(255,138,31,.1));
  border:1px solid color-mix(in srgb,currentColor 20%,transparent);
  font-size:0; line-height:0; filter:none;
}
body .zb-command-icon .fx-modal-glyph { display:block; width:32px; height:32px; overflow:visible; pointer-events:none; }
body .zb-command-icon .fx-modal-glyph,
body .zb-command-icon .fx-modal-glyph * { color:inherit!important; fill:none!important; stroke:currentColor!important; }
body .zb-command-icon .fx-modal-glyph .fx-glyph-wash * { fill:currentColor!important; fill-opacity:.12; stroke:none!important; }
.foxy-ui #root .zb-command-card { display:grid; grid-template-rows:52px auto; align-content:start; justify-items:center; min-height:140px; gap:12px; padding:18px 12px; }
.foxy-ui #root .zb-command-name { display:grid; align-items:center; min-height:2.9em; font:600 13px/1.45 var(--font-family-base,system-ui); }
.foxy-ui #root .zb-modal-header,
.foxy-ui #root .zb-tabs { flex-shrink:0; }
.foxy-ui #root .zb-modal-body { min-height:0; }
@media (max-width:600px) {
  .foxy-ui #root .zb-command-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .foxy-ui #root .zb-command-card { min-width:0; padding:16px 10px; }
}

/* Local session camera: shared picker and compact sidebar. */
.foxy-ui .fx-session-dialog .fx-camera-device .fx-select-control { display:block; width:100%; min-width:0; margin:0; }
.foxy-ui .fx-session-dialog .fx-camera-device .fx-select-trigger { margin:0; width:100%; justify-content:space-between; text-align:start; gap:10px; font-size:14px; min-height:46px; height:auto; padding:10px 12px; }
.foxy-ui .fx-session-dialog .fx-camera-device .fx-select-value { flex:1; text-align:start; }
.foxy-ui .fx-session-dialog .fx-camera-record-count { float:none; font-weight:400; }
.foxy-ui .fx-session-dialog .fx-camera-records-empty { display:flex; flex-direction:column; align-items:center; gap:8px; padding:16px 0 4px; color:var(--fx-muted); text-align:center; }
.foxy-ui .fx-session-dialog .fx-camera-records-empty p { margin:0; }
.foxy-ui .fx-session-dialog .fx-camera-records-empty svg { width:28px; height:28px; }
.foxy-ui .fx-session-dialog .fx-camera-preview > .fx-preview-note { margin:0; padding:0 16px 16px; }
