/* Inspector controls share the designer's existing control sizes and colors. */
.designer-panel .two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}
.designer-panel .two-col > * { min-width: 0; }
.designer-panel input[type="color"] {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 6px;
  padding: 4px;
  border: 1px solid rgba(29,29,31,.12);
  border-radius: 10px;
  background: #f4f4f7;
  cursor: pointer;
}
.designer-panel input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.designer-panel input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(29,29,31,.08);
  border-radius: 6px;
}
.designer-panel input[type="color"]::-moz-color-swatch {
  border: 1px solid rgba(29,29,31,.08);
  border-radius: 6px;
}
.designer-panel .field-row input[type="color"] { flex: 0 0 42px; margin-top: 0; }
.designer-panel .shape-rule-row input[type="color"] { width: 44px; margin-top: 0; }
.inspector-content > .panel-section {
  margin: 16px 0;
  padding: 16px 0;
}
.inspector-content > .panel-section > h3 {
  margin: 0 0 12px;
  color: #1d1d1f;
  font: 650 13px/20px system-ui, sans-serif;
}
.inspector-content > .panel-section > p {
  margin: 8px 0 12px;
  color: #6e6e73;
  font: 11px/1.6 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.inspector-content > .panel-section label { margin-bottom: 12px; }
.designer-panel .inspector-action,
.designer-panel .layer-actions button,
.designer-panel .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  color: #3a3a3c;
  font: 550 12px/18px system-ui, sans-serif;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(29,29,31,.09);
  border-radius: 9px;
  background: var(--control, #f1f1f4);
  cursor: pointer;
}
.designer-panel .inspector-action-primary {
  color: #fff;
  border-color: var(--blue, #0071e3);
  background: var(--blue, #0071e3);
}
.designer-panel :is(.inspector-action,.layer-actions button,.secondary-action):hover:not(:disabled) {
  color: #0066cc;
  border-color: rgba(0,113,227,.24);
  background: #e8f2fe;
}
.designer-panel .inspector-action-primary:hover:not(:disabled) { color: #fff; background: #0066cc; }
.designer-panel :is(.inspector-action,.layer-actions button,.secondary-action):focus-visible {
  outline: 2px solid var(--blue, #0071e3);
  outline-offset: 2px;
}
.designer-panel :is(.inspector-action,.secondary-action):disabled {
  color: #9399a2;
  border-color: #e2e5e9;
  background: #eef0f3;
  cursor: default;
  opacity: 1;
}
.designer-panel #removeBackground { color: #c1322a; }
#textColorsSettings .character-color-controls { grid-template-columns: 64px minmax(0,1fr); }
#characterColorHex { height: 38px; font-variant-numeric: tabular-nums; }
#characterColorText { min-height: 76px; line-height: 1.6; }
#textColorsSettings #characterColorSelection {
  max-height: 76px;
  margin: 10px 0 12px;
  padding: 8px 10px;
  overflow: auto;
  border-radius: 8px;
  background: #f1f4f8;
}
#textColorsSettings #characterColorError { color: #c1322a; }
#textColorsSettings #characterColorError:empty { display: none; }
.character-color-actions { margin-top: 2px; }
#resetCharacterColors { width: 100%; margin-top: 8px; }
.designer-panel .toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.designer-panel .layer-actions { margin-top: 14px; gap: 8px; }
.designer-panel :is(#shapeStrokeOpacity,#shapeStrokeOpacityValue) { vertical-align: middle; }
#shapeStrokeOpacityValue {
  display: inline-block;
  min-width: 38px;
  color: #1d1d1f;
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.designer-toolbar .tool-group :is(button,.tool-button) { min-width: 56px; padding-inline: 6px; }
.designer-toolbar .tool-group span { white-space: nowrap; }
@media (min-width:821px) and (max-width:1040px) {
  .designer-workspace { grid-template-columns: 200px minmax(240px,1fr) 280px; }
  .designer-toolbar {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 4px 8px;
    overflow: visible;
  }
  .designer-toolbar > .tool-group:first-child { grid-column: 1; grid-row: 1; }
  .designer-toolbar > .tool-group:nth-child(2) { grid-column: 1; grid-row: 2; margin-left: 0; }
  .designer-toolbar > .tool-group:nth-child(3) { grid-column: 2; grid-row: 2; justify-self: end; }
  .designer-toolbar .preview-restore { grid-column: 2; grid-row: 1; margin-left: 0; justify-self: end; }
}

.designer-panel .toggle-row { min-height: 24px; gap: 12px; font: 11px/1.5 system-ui, sans-serif; }
.designer-panel .toggle-row > span { min-width: 0; }

.designer-panel #shapeSettings > p,
.designer-panel .control-hint { margin: 8px 0 12px; color: #6e6e73; font: 11px/1.6 system-ui, sans-serif; }
#shapeSettings label:has(> #shapeStrokeOpacity) {
  display: grid;
  grid-template-columns: minmax(0,1fr) 42px;
  gap: 6px 8px;
}
#shapeStrokeOpacity { grid-area: 2 / 1; width: 100%; height: 22px; margin: 0; }
#shapeStrokeOpacityValue { grid-area: 2 / 2; min-width: 0; line-height: 22px; }
