/* SVG Editor specific styles
   Extracted from shared-style.css for cleaner separation.
   This file is loaded after shared-style.css. */

#svgEditorModal {
  align-items: flex-start !important;
}

#svgEditorModal .modal-window {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

#svgEditorModal .modal-window>div:nth-child(2),
#editorCanvasContainer {
  flex: 1;
  display: flex;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
}

#editorCanvasContainer {
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
}

#editorSVGContainer {
  width: auto;
  max-width: 100%;
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: none;
}

#editorSVGContainer svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.editor-sidebar {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  padding: 12px 8px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
}

.editor-sidebar .tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 50px !important;
  width: 50px !important;
  height: 50px !important;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.85);
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.editor-sidebar .tool-btn:hover {
  background: rgba(255,255,255,1);
  border-color: rgba(0,0,0,0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.editor-sidebar .tool-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: rgba(37,99,235,0.6);
  box-shadow: 0 6px 16px rgba(37,99,235,0.16);
}

.editor-sidebar .tool-btn.active svg {
  stroke: #fff;
  fill: currentColor;
}

.inactive-layer {
  opacity: 0.32 !important;
  pointer-events: none;
}

.editor-sidebar .tool-btn svg {
  width: 20px;
  height: 20px;
}


#editorHiddenInput {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
}

.editor-symbol-keyboard {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  max-height: var(--keyboard-max-height, 80vh);
  min-height: 140px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.16);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -8px 20px rgba(0,0,0,0.12);
  padding: 10px;
  overflow: hidden;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  touch-action: none;
}

@media (min-width: 721px) {
  .editor-symbol-keyboard {
    max-height: var(--keyboard-max-height, 80vh);
    min-height: 140px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.08);
    border-left: 1px solid rgba(0,0,0,0.16);
    border-right: none;
    border-bottom: none;
    margin-top: 0;
    padding: 12px;
    flex: 0 0 auto;
  }
}

.editor-symbol-keyboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  grid-auto-rows: 38px;
  gap: 6px;
  overflow-y: auto;
  max-height: calc(var(--keyboard-max-height, 80vh) - 92px);
  padding-bottom: 2px;
}

.editor-symbol-keyboard-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.editor-symbol-keyboard-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.editor-symbol-keyboard-note {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
}

.editor-symbol-family-select {
  min-width: 120px;
  max-width: 220px;
  width: 100%;
  font-size: 11px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.editor-symbol-keyboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}


.symbol-key {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.symbol-key:hover {
  background: #f1f5f9;
}

.symbol-key:active {
  transform: scale(0.98);
  background: #e2e8f0;
}

.symbol-key-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.editor-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  align-items: center;
  min-height: 58px;
}

.editor-toolbar-top > * {
  flex: 0 0 auto;
}

.editor-properties-panel {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 680px;
}

.editor-properties-pane {
  display: none;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.editor-properties-pane.active {
  display: flex;
}

.property-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.property-label {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
  min-width: 0;
}

.property-select,
.property-number,
.property-range {
  font: 13px/1.4 Arial, sans-serif;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.property-select {
  min-width: 120px;
  height: 32px;
  padding: 0 10px;
}

.property-number {
  width: 62px;
  min-width: 62px;
  height: 32px;
  padding: 0 10px;
  text-align: center;
}

.property-range {
  min-width: 140px;
  max-width: 220px;
  height: 24px;
}

.stepper-btn {
  background: var(--surface);
  border: none;
  width: 24px;
  height: 100%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: background 0.2s;
}

.stepper-btn:hover {
  background: #e0e0e0;
}

.stepper-btn:active {
  background: #d0d0d0;
}

.stepper-container input.property-number {
  width: auto;
  min-width: 50px;
  height: 100%;
  padding: 0 6px;
  margin: 0;
  background: transparent;
  border: none;
  font-weight: 600;
  text-align: center;
}

.editor-action-btn {
  height: 32px;
  min-width: 84px;
}

.editor-layer-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  margin-left: 12px;
  white-space: nowrap;
}

.property-note {
  font-size: 12px;
  opacity: 0.75;
}

#editorStrokeGroup,
#editorFontGroup {
  width: auto;
  justify-content: flex-start;
}

#editorStrokeWidthSlider {
  flex: 1;
  margin-right: 12px;
}

