/* PDF Resizer UI port. Source: pdfresizer/src/index.css and SizeAdjusterCard.tsx.
   Scoped to editor chrome so print artwork retains its source typography. */
:root { --ui-bg:#ececec; --ui-text:#213547; --ui-secondary:#888; --ui-input:#fff; --ui-border:#ccc; --ui-divider:rgba(0,0,0,.1); --ui-active:#6f6f6f; --ui-accent:#007aff; --ui-font:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; }
.topbar, .panel, .ruler-label { font-family:var(--ui-font); color:var(--ui-text); -webkit-font-smoothing:antialiased; }
.topbar, .panel { background:#f9f9f9; border-color:var(--ui-divider); }
.canvas-stage { background:var(--ui-bg); }
.panel { font-size:13px; }
.topbar input, .panel input, .panel textarea, .panel select, .panel button, .topbar button, .topbar select { font-family:var(--ui-font); }
.text-input, .text-area, .route-select, .route-scale-value { border-color:var(--ui-border); border-radius:4px; background:var(--ui-input); color:var(--ui-text); font-weight:400; }
.text-input:focus, .text-area:focus, .route-scale-value:focus { outline:none; border-color:var(--ui-accent); box-shadow:0 0 0 2px #007aff20; }
.button, .insert-button, .route-sort-button, .scale-reset-button { border-radius:8px; border-color:transparent; background:#ececec; color:var(--ui-text); font-weight:500; transition:background-color .18s ease,border-color .25s; }
.button:hover, .insert-button:hover, .route-sort-button:not(:disabled):hover, .scale-reset-button:hover { background:#e2e2e2; border-color:#007aff; }
.button-primary { background:var(--ui-active); color:#fff; }
.button-primary:hover { background:#5c5c5c; }
.field-label, .panel-heading { font-weight:500; color:var(--ui-text); }
.route-card { border-color:var(--ui-divider); }
.route-card.is-active, .route-card > .route-identity { background:#f0f0f0; }
.route-item-summary { color:var(--ui-text); }
.route-item-label { font-weight:400; }
.route-item-summary:hover { background:#f0f0f0; }
.route-card > .route-identity .route-number-input { font-family:'Moscow Sans W',sans-serif; }
.route-status-segments { background:var(--ui-bg); border:0; border-radius:14px; padding:3px; gap:2px; height:30px; }
.route-status-segments button { position:relative; border-radius:10px; font:500 11px/20px var(--ui-font); padding:0 5px; white-space:nowrap; color:var(--ui-text); transition:background .25s cubic-bezier(.4,1.6,.6,1),color .2s; }
.route-status-segments button[aria-pressed='true'] { background:var(--ui-active); color:#fff; box-shadow:none; }
.route-scale-value { font:400 12px/20px var(--ui-font); }
.route-scale-auto-label, .route-free-toggle { font-family:var(--ui-font); color:var(--ui-text); }
.route-free-toggle span { transform:none; }
.route-scale-slider input[type='range']::-webkit-slider-runnable-track { background:#ccc; }
.route-scale-slider input[type='range']::-webkit-slider-thumb { background:var(--ui-active); }
.route-scale-slider input[type='range']::-moz-range-track { background:#ccc; }
.route-scale-slider input[type='range']::-moz-range-thumb { background:var(--ui-active); }
.rebus-sizing { grid-template-columns:repeat(2,minmax(0,1fr)) 24px; position:relative; column-gap:8px; align-items:end; padding-bottom:0; }
.rebus-sizing > .field-label { display:block; min-width:0; margin-top:0; margin-bottom:0; }
.rebus-sizing .text-input, .rebus-sizing #rebusScale { width:100%; margin-top:5px; }
.scale-field-with-reset { display:flex; align-items:center; gap:6px; width:100%; }
.scale-field-with-reset .text-input { min-width:0; flex:1; }
.scale-reset-button { display:flex; flex:none; align-items:center; justify-content:center; width:24px; height:28px; padding:4px; }
.scale-reset-button img { display:block; width:16px; height:16px; }
.rebus-sizing .scale-reset-button { position:absolute; right:0; bottom:0; }
#sortRoutesButton { flex:none; align-self:flex-start; margin-top:6px; }
#routesTextInput { margin-top:12px; flex:none; }

.panel select, .topbar select { appearance:auto; -webkit-appearance:auto; background-image:none; padding-right:6px; }
.scale-reset-button, .scale-reset-button:hover { background:transparent; border:0; border-radius:0; box-shadow:none; }
.scale-reset-button img { width:20px; height:20px; opacity:.65; }
.scale-reset-button:hover img { opacity:1; }
/* Leave select chrome to the platform, including its border and arrow inset. */
.panel select, .topbar select,
.route-card .route-select,
.route-card .route-identity .route-transport-select {
  appearance:auto;
  -webkit-appearance:auto;
  border:revert;
  border-radius:revert;
  padding:revert;
  background:revert;
  line-height:normal;
  font-weight:400;
  box-shadow:none;
}
@font-face { font-family:'DoT Icons U'; src:url('./assets/fonts/dot-icons-u.otf') format('opentype'); }
.colored-source-editor { position:relative; min-width:0; width:100%; margin-top:10px; }
.colored-source-editor textarea { display:block; position:relative; margin:0!important; background:transparent; color:transparent; caret-color:var(--ui-text); font:400 14px/1.3 var(--ui-font); }
.colored-source-proof { position:absolute; inset:0; border:1px solid transparent; border-radius:4px; background:#fff; padding:8px 9px; overflow:hidden; white-space:pre-wrap; overflow-wrap:break-word; font:400 14px/1.3 var(--ui-font); color:var(--ui-text); pointer-events:none; }
.text-palettes { flex:none; padding:8px 0; font:400 12px/1.4 var(--ui-font); }
.text-color-palette { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:6px; }
.text-color-swatch { width:16px; height:16px; padding:0; border:1px solid #0002; border-radius:50%; }
.text-color-swatch[aria-pressed='true'] { outline:2px solid #007aff; outline-offset:1px; }
.text-symbol-palette { display:grid; grid-template-columns:repeat(auto-fill,minmax(32px,1fr)); gap:3px; max-height:230px; overflow:auto; margin-top:6px; }
.text-symbol-palette button { display:grid; place-items:center; height:36px; padding:3px; border:1px solid #ddd; border-radius:4px; background:#fff; }
.text-symbol-palette svg { width:100%; height:100%; }
.dot-inline-symbol { display:inline-block; height:1em; vertical-align:-.25em; line-height:0; }
.dot-inline-symbol > svg { display:block; height:100%; width:auto; }

.dot-text-space { display:inline; font-family:"DoT Icons U"; font-weight:400; font-feature-settings:"liga" 1; }

.dot-symbol-text-run { white-space:nowrap; }
.text-color-auto { padding:0 5px; height:20px; font-size:11px; border:1px solid #0002; border-radius:4px; background:transparent; }
.text-color-auto[aria-pressed='true'] { color:#007aff; border-color:#007aff; }

.dot-strike { color:var(--secondary-text, #977e34) !important; text-decoration-line:underline; text-decoration-color:#000; text-decoration-thickness:.04em; text-underline-offset:-.316em; text-decoration-skip-ink:none; }
.dot-strike > span { color:inherit !important; }
.text-formatting-toolbar { margin-bottom:8px; }
.text-strike-button { text-decoration:none; }

/* Tabs rise into the reserved space above the row. */
.document-tabs {display:flex;align-items:flex-end;gap:5px;padding:14px 16px 0;overflow-x:auto;flex-shrink:0;background:#f1f1f1;}
.document-tab {display:flex;align-items:center;position:relative;flex-shrink:0;min-width:120px;max-width:260px;height:35px;margin-top:5px;border:1px solid #ddd;border-bottom:0;border-radius:8px 8px 0 0;background:#e7e7e7;}
.document-tab.is-active {height:40px;margin-top:0;background:#fff;border-color:#ddd;box-shadow:0 1px 0 #fff;z-index:1;}
.document-tabs button {font:inherit;cursor:pointer;}
.document-tab-label {flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;padding:8px 10px;border:0;background:transparent;}
.document-tab-close {flex-shrink:0;width:24px;height:24px;margin-right:6px;padding:0;border:0;border-radius:4px;background:transparent;font-size:18px!important;color:#666;}
.document-tab-close:hover {background:#0001;color:#222;}
.document-tab-add {align-self:center;white-space:nowrap;border:1px solid transparent;border-radius:6px;padding:6px 10px;margin:0 0 4px 3px;background:transparent;color:#555;}
.document-tab-add:hover {border-color:#ccc;background:#fff;}
.document-tab.is-dragging {opacity:.45;}
.document-tab.drop-before::before,.document-tab.drop-after::after {content:"";position:absolute;top:2px;bottom:2px;width:3px;background:#007aff;}
.document-tab.drop-before::before {left:-4px;}.document-tab.drop-after::after {right:-4px;}
@media print { .document-tabs {display:none!important;} }

.transient-status {opacity:1;transition:opacity .35s ease;}
.transient-status.status-fading {opacity:0;}
@media (prefers-reduced-motion:reduce) {.transient-status {transition:none;}}

.workbench {position:relative;}
.file-drop-overlay {position:absolute;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(245,248,255,.92);backdrop-filter:blur(6px);pointer-events:none;font-family:var(--ui-font);}
.file-drop-overlay[hidden] {display:none;}
.file-drop-card {width:min(620px,100%);padding:48px 24px;border:2px dashed #007aff;border-radius:20px;text-align:center;background:#fff;box-shadow:0 12px 48px #007aff15;color:#007aff;}
.file-drop-card h2 {margin:20px 0 16px;font-size:26px;font-weight:600;}
.file-drop-card p {margin:8px 0;color:#555;font-size:16px;}
@media print {.file-drop-overlay {display:none!important;}}

/* Keep export controls aligned while retaining native select behavior. */
.top-actions { align-items:center; }
.top-actions .button,
.top-actions select {
  box-sizing:border-box;
  height:34px;
  min-height:34px;
  margin:0;
  padding:0 12px;
  border-radius:6px;
  font:500 13px/normal var(--ui-font);
  white-space:nowrap;
}
.top-actions select { width:auto; min-width:76px; }
.top-actions > label { font:400 13px/normal var(--ui-font); }

/* Consistent arrow inset; the select's popup remains the native browser menu. */
.panel select, .topbar select,
.route-card .route-select,
.route-card .route-identity .route-transport-select {
  appearance:none;
  -webkit-appearance:none;
  padding-right:28px;
  padding-left:7px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23657080' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:right 10px center;
  background-repeat:no-repeat;
  background-size:10px 6px;
}

.property-section[data-properties="artboard"] select,
.property-section[data-properties="date"] select {
  box-sizing:border-box;
  width:100%;
  height:28px;
  min-height:28px;
  padding-top:3px;
  padding-bottom:3px;
  font-size:13px;
  line-height:20px;
}

.panel select, .topbar select,
.route-card .route-select,
.route-card .route-identity .route-transport-select {
  border-radius:6px;
}
.text-formatting-toolbar { display:flex; gap:5px; }
.text-bold-button b { font-weight:800; }
.text-strike-button s, .text-bold-button b { font-size:15px; }

.text-bold-button, .text-bold-button b { text-decoration:none; }

/* Native textarea selection uses one font weight. Keep its proof on identical metrics. */
.colored-source-proof .source-bold-range { font-weight:400; }

.text-color-dropdown { height:28px; padding:3px 10px; border:1px solid var(--ui-border); border-radius:6px; background:var(--ui-input); color:var(--ui-text); font:400 13px var(--ui-font); }
.text-color-dropdown::after { content:"⌄"; margin-left:10px; }
.text-color-menu { position:fixed; inset:auto; margin:0; width:240px; padding:5px; border:1px solid #d3d6db; border-radius:8px; background:#fff; box-shadow:0 8px 24px #0002; overflow:auto; }
.text-color-menu:popover-open { display:flex; flex-direction:column; gap:1px; }
.text-color-menu .text-color-swatch, .text-color-menu .text-color-auto { display:flex; align-items:center; gap:9px; flex:none; width:100%; height:26px; padding:3px 7px; border:0; border-radius:4px; background:transparent; color:#252525; text-align:left; font:400 12px var(--ui-font); }
.text-color-menu button:hover, .text-color-menu button:focus-visible { background:#edf0f5; }
.text-color-menu button[aria-pressed="true"] { background:#e9ddfa; }
.text-color-menu-swatch { flex:none; width:14px; height:14px; border:1px solid #0002; border-radius:2px; }
.text-color-menu:not(:popover-open) { display:none; }

.text-color-dropdown { display:flex; align-items:center; gap:7px; height:36px; min-height:36px; min-width:0; flex:1; }
.text-color-dropdown > span:not(.text-color-menu-swatch) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.text-color-dropdown::after { margin-left:auto; }
.text-color-menu:popover-open { flex-wrap:nowrap; overflow-x:hidden; overflow-y:auto; }
.text-color-menu button { box-sizing:border-box; }
.text-color-menu-swatch[hidden] { display:none; }

.text-color-menu-heading { flex:none; padding:9px 7px 4px; color:#777; font:500 11px var(--ui-font); }

.text-color-menu-values { margin-left:auto; flex:none; color:#858585; font-size:10px; font-variant-numeric:tabular-nums; }

.text-color-menu .text-color-swatch, .text-color-menu .text-color-auto {
  height:auto;
  min-height:26px;
  align-items:flex-start;
  padding:5px 7px;
  line-height:16px;
}
.text-color-menu .text-color-swatch > span:nth-child(2) {
  flex:1;
  min-width:0;
  white-space:normal;
  overflow-wrap:break-word;
}
.text-color-menu .text-color-menu-swatch { margin-top:1px; }
.text-color-menu-values { line-height:16px; white-space:nowrap; }

.route-card .plaque-color-dropdown { height:28px; min-height:28px; width:100%; font-size:12px; }
.route-card select[hidden] { display:none; }

.top-actions .button:has(.download-icon) { display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.download-icon { flex:none; }

.top-actions #pdfSize { margin-left:12px; }
