/* Printed Bearing Designer: only what cct_theme.css and cct_layout.css (served from cct_common)
   don't already give. The part colours (the owner, 2026-11-16, second word: "the inner and outer
   race are both blue, balls are silver, and the cage is red"; then "inner race to a lighter
   blue"); static/app.js uses the same values in the 3D view. */
:root {
  --pbd-inner: #4ea1f3;
  --pbd-outer: #0078d4;
  --pbd-elements: #b8bec6;
  --pbd-cage: #d13438;
}
.field-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.field-row[hidden] { display: none; }       /* the display above would otherwise beat the hidden attribute */
.group-box { border: 1px solid #c8d0db; border-radius: 6px; padding: 6px 10px 4px; margin: 0 0 8px; }
.group-box legend { font-size: 11px; font-weight: 600; color: #0078d4; padding: 0 4px;
                    display: flex; align-items: center; gap: 4px; }
.group-box legend .btn-help { font-size: 12px; }
/* the files' name: the label above, the box the card's full width (a built name runs long) */
.download-card .dl-name-row { display: block; text-align: left; }
.download-card .dl-name-row label { display: block; margin-bottom: 3px; }
.download-card .dl-name-row input { width: 100%; box-sizing: border-box; font-family: Consolas, monospace; font-size: 11px; }
/* the Explode slider (Planetary's, E-Box Designer's) */
.explode-row { display: flex; align-items: center; gap: 5px; font-size: 12px; flex-shrink: 0; }
.explode-row label { font-weight: 700; margin: 0; }
.explode-row input[type="range"] { width: 90px; accent-color: #0078d4; }
.explode-row .unit { width: 44px; text-align: right; flex-shrink: 0; color: #666; font-size: 11px; }
/* the files' name in the Download window, under its title */
.dl-file-name { margin: -6px 0 10px; font-size: 13px; color: #1f2933; word-break: break-all; }
.dl-file-name b { font-size: 14px; }
.dl-file-name span { color: #666; font-size: 12px; }
/* the note above the left-hand menus: what the app is for */
/* the tool's own line, standing out above the menus (the owner, 2026-11-16) */
.app-note { font-size: 14px; font-weight: 700; color: #0078d4; padding: 8px 10px; margin-bottom: 8px;
            background: #eef5fc; border: 1px solid #90b8db; border-left: 4px solid #0078d4; border-radius: 6px;
            display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-note .btn-help { font-style: normal; flex-shrink: 0; }
/* a menu's header (Timing Pulleys' .hub-header, cct_layout.css): its title, then its ⓘ and arrow */
.hub-tools { display: flex; align-items: center; gap: 8px; }
.hub-header .btn-help { text-transform: none; }
.hub-header:focus-visible { outline: 2px solid #0078d4; outline-offset: 2px; }
.group-box[hidden] { display: none; }
.group-box.sub-box { margin: 4px 0 6px; padding: 4px 8px 2px; border-color: #dde3ea; background: #fbfcfe; }
.preview-header .turn-btn, .preview-header .drive-info-btn { flex-shrink: 0; }
.field-row label { flex: 1; margin: 0; font-size: 12px; }
.field-row input, .field-row select { width: 104px; }
.field-row input[type="checkbox"] { width: auto; margin: 0 88px 0 0; }   /* lined up with the boxes' left edge */
.view3d { width: 100%; height: 100%; }
.turn-btn.active { background: #0078d4; color: #fff; border-color: #0078d4; }
.invalid-panel { margin: 6px 16px; padding: 8px 10px; background: #fee2e2; border: 1px solid #f87171; border-radius: 5px; color: #b91c1c; font-size: 12px; }
.warnings { margin: 4px 16px; padding-left: 16px; font-size: 12px; }
.warnings .check-error { color: #b91c1c; }
.warnings .check-warn { color: #9a6700; }
#dims-details { padding: 4px 16px 8px; }
/* the 3D view and the results below it share this column; the results at most a fifth of it, so never
   more than a quarter of the 3D view's height, scrolling past that (the owner, 2026-11-17) */
.view-stack { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.view-stack > .preview-box { flex: 1 1 auto; min-height: 0; }
.results { flex: 0 1 auto; min-height: 0; max-height: calc(20% - 1px); overflow-y: auto; }   /* 1px: never a rounded pixel over */
.part-key { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.part-key li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.25); }
.role-inner { background: var(--pbd-inner); }
.role-outer { background: var(--pbd-outer); }
.role-elements { background: var(--pbd-elements); }
.role-cage { background: var(--pbd-cage); }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.dims-summary { display: flex; align-items: center; gap: 6px; }
.dims-summary .btn-help { margin-left: 2px; }
#drive-bar .btn-help { margin-left: auto; }
/* the help window (Gear Designer's static/style.css) */
#help-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; }
#help-overlay[hidden] { display: none; }
#help-box { background: #fff; border-radius: 8px; width: min(760px, 95vw); height: 85vh;
  display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,0.3); overflow: hidden; }
#help-head { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid #dde3ea; background: #f7f9fc; flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: #333; }
#help-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #555;
  line-height: 1; padding: 0 4px; width: auto; }
#help-iframe { flex: 1; border: none; min-height: 0; }

/* ── Import dialog (Timing Pulleys' #import-overlay; the owner, 2026-11-17: "Like pulley app, there
   should be an import button on the right side under the title bar") ── */
#import-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 1100;
  align-items: center; justify-content: center; }
#import-box { background: #fff; border-radius: 8px; width: min(480px, 96vw); display: flex; flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35); overflow: hidden; }
.import-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 12px;
  border-bottom: 1px solid #dde3ea; background: #eff6ff; flex-shrink: 0; }
.import-title { font-size: 17px; font-weight: 700; color: #1e3a5f; }
.import-info { padding: 16px 20px 12px; border-bottom: 1px solid #e8edf3; background: #f8fafc; }
.import-info p { font-size: 13px; color: #374151; line-height: 1.55; margin: 0; }
.import-body { padding: 16px 20px 10px; display: flex; flex-direction: column; gap: 8px; }
.import-file-input { width: 100%; font-size: 13px; font-family: inherit; padding: 6px 4px; border: 1px solid #c8d6e2;
  border-radius: 4px; background: #fff; box-sizing: border-box; cursor: pointer; }
.import-file-input:focus { outline: none; border-color: #0078d4; }

/* ── Auto-fix (cct_autofix.js; the owner, 2026-11-17: "pop up an auto fix button similar to Pulley's app") ── */
.autofix-box { margin: 6px 0 10px; padding: 8px 10px; border: 1px solid #fcd34d; border-radius: 6px; background: #fffbeb; }
.autofix-box .fix-btn { padding: 3px 12px; font-size: 12px; font-weight: 600; background: #16a34a; color: #fff;
  border: 1px solid #15803d; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.autofix-box .fix-btn:hover { background: #15803d; }
