/* ── Bootstrap Beállító Panel (jobb oldali sidebar) ─────────────────────── */
#editor-settings-panel {
  box-sizing: border-box;
  transition: width 0.2s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* a belső tab-panel-ek kezelik a scrollt */
}

/* ── Tab navigáció ───────────────────────────────────────────────────────── */
#editor-settings-panel .esp-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 2px solid #dee2e6;
  background: #f8f9fa;
}

#editor-settings-panel .esp-tab-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition:
    color 0.15s,
    background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#editor-settings-panel .esp-tab-btn:hover {
  color: #495057;
  background: #e9ecef;
}

#editor-settings-panel .esp-tab-btn.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  background: #fff;
}

#editor-settings-panel .esp-tab-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#editor-settings-panel .esp-tab-panel.active {
  display: flex;
}

/* ── DOM-fa (Felépítés fül) ──────────────────────────────────────────────── */
#editor-settings-panel .esp-tree {
  padding: 6px 2px;
  flex: 1;
}

#editor-settings-panel .esp-tree-empty {
  padding: 20px 14px;
  color: #adb5bd;
  font-size: 11px;
  text-align: center;
  line-height: 1.7;
}

#editor-settings-panel .esp-tree-node {
  /* konténer a sorhoz + gyerekekhez */
}

#editor-settings-panel .esp-tree-row {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 3px;
  min-height: 21px;
  user-select: none;
}

#editor-settings-panel .esp-tree-clickable {
  cursor: pointer;
}

#editor-settings-panel .esp-tree-clickable:hover {
  background: #f1f3f5;
}

#editor-settings-panel .esp-tree-selected {
  background: #dbeafe !important;
}

#editor-settings-panel .esp-tree-indent {
  display: inline-block;
  width: 14px;
  flex-shrink: 0;
}

#editor-settings-panel .esp-tree-toggle {
  display: inline-block;
  width: 12px;
  font-size: 10px;
  color: #adb5bd;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}

#editor-settings-panel .esp-tree-tag {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: #868e96;
  background: #f1f3f5;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

#editor-settings-panel .esp-tree-cls {
  color: #adb5bd;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-family: "Courier New", monospace;
}

#editor-settings-panel .esp-tree-preview {
  color: #868e96;
  font-size: 10px;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

#editor-settings-panel .esp-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  padding: 24px 16px;
  color: #adb5bd;
  text-align: center;
  gap: 12px;
}

#editor-settings-panel .esp-placeholder p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #adb5bd;
}

#editor-settings-panel .esp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #e9ecef;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  font-size: 12px;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  position: sticky;
  top: 0;
  z-index: 1;
  flex-shrink: 0;
}

#editor-settings-panel .esp-header .esp-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#editor-settings-panel .esp-type-badge.type-row {
  background: #dbeafe;
  color: #1d4ed8;
}

#editor-settings-panel .esp-type-badge.type-col {
  background: #fce7f3;
  color: #be185d;
}

#editor-settings-panel .esp-type-badge.type-img {
  background: #dcfce7;
  color: #166534;
}

#editor-settings-panel .esp-type-badge.type-text {
  background: #fef9c3;
  color: #854d0e;
}

#editor-settings-panel .esp-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#editor-settings-panel .esp-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#editor-settings-panel .esp-field label {
  font-size: 11px;
  font-weight: 600;
  color: #6c757d;
  margin: 0;
}

#editor-settings-panel .esp-field select,
#editor-settings-panel .esp-field input[type="text"],
#editor-settings-panel .esp-field input[type="number"] {
  width: 100%;
  padding: 4px 7px;
  font-size: 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}

#editor-settings-panel .esp-field select:focus,
#editor-settings-panel .esp-field input:focus {
  outline: none;
  border-color: #86b7fe;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

#editor-settings-panel .esp-divider {
  height: 1px;
  background: #dee2e6;
  margin: 4px 0;
}

#editor-settings-panel .esp-row-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

#editor-settings-panel .esp-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #adb5bd;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

#editor-settings-panel .esp-btn-group {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

#editor-settings-panel .esp-btn {
  flex: 1;
  min-width: 28px;
  padding: 3px 5px;
  font-size: 11px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  line-height: 1.4;
}

#editor-settings-panel .esp-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

#editor-settings-panel .esp-btn-active {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

#editor-settings-panel .esp-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #495057;
  cursor: pointer;
  padding: 3px 0;
  user-select: none;
}

#editor-settings-panel .esp-checkbox input {
  margin: 0;
  cursor: pointer;
}

/* ── Drag-and-drop (Felépítés fül) ──────────────────────────────────────── */
#editor-settings-panel .esp-tree-row[draggable="true"] {
  cursor: grab;
}

#editor-settings-panel .esp-tree-row.esp-dragging {
  opacity: 0.35;
}

#editor-settings-panel .esp-tree-row.esp-drag-before {
  border-top: 2px solid #3b82f6;
  background: #eff6ff !important;
}

#editor-settings-panel .esp-tree-row.esp-drag-after {
  border-bottom: 2px solid #3b82f6;
  background: #eff6ff !important;
}

#editor-settings-panel .esp-tree-row.esp-drag-inside {
  background: #bfdbfe !important;
  outline: 2px dashed #3b82f6;
  outline-offset: -2px;
}
