/* Live UI overrides for www.cax-viewer.com.
   This file is served from /ui/overrides.css without long-lived caching, so a
   styling change is a single small upload: no rebuild, no page edits, no .gz. */

/* Compact two-row top bar.
   Row 1: brand + import/export + theme/language controls.
   Row 2: job status, supported formats and account storage on one line. */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.topbar > .brand-block { order: 1; }
.topbar > .upload-form { order: 2; margin-left: auto; flex-wrap: nowrap; }
.topbar > .header-actions { order: 3; }
.topbar > .job-summary {
  order: 4;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
}
.topbar > .job-summary > #status-detail {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar > .job-summary > #status-badge { flex: 0 0 auto; white-space: nowrap; }
.topbar > .job-summary > #account-storage { flex: 0 0 auto; width: auto; white-space: nowrap; }

@media (max-width: 1200px) {
  .topbar #user-beta-status { display: none; }
  .topbar .export-control > span { display: none; }
}
@media (max-width: 980px) {
  .topbar > .brand-block p { display: none; }
}

/* Section flip/reset only change the view while clipping is enabled. Make that
   state visible instead of leaving controls that appear to do nothing. */
body:has(#viewer-canvas[data-section-enabled="false"]) .section-actions button,
body:has(#viewer-canvas[data-section-enabled="false"]) .section-axis button,
body:has(#viewer-canvas[data-section-enabled="false"]) .section-position input {
  opacity: 0.45;
  pointer-events: none;
}
body:has(#viewer-canvas[data-section-enabled="false"]) .section-actions::after {
  content: "请先点击“启用”";
  display: block;
  font-size: 12px;
  color: var(--cax-muted, #6b7280);
}
html[lang="en"] body:has(#viewer-canvas[data-section-enabled="false"]) .section-actions::after {
  content: "Enable section first";
}
