/* Visual editor: only active when the page is opened with ?edit=1. */
body.hf-edit-mode {
  padding-right: 318px;
}

.hf-edit-mode [data-hf-editable] {
  cursor: text;
  transition: outline-color .16s ease, box-shadow .16s ease;
}

.hf-edit-mode img[data-hf-editable],
.hf-edit-mode [data-hf-editable="map"] {
  cursor: pointer;
}

.hf-edit-mode [data-hf-editable]:hover {
  outline: 2px dashed rgba(19, 116, 180, .72);
  outline-offset: 4px;
}

.hf-edit-mode [data-hf-editable].hf-selected {
  outline: 3px solid #1374b4 !important;
  outline-offset: 5px;
  box-shadow: 0 0 0 7px rgba(19, 116, 180, .14);
}

.hf-edit-mode [contenteditable="true"]:focus {
  outline: 3px solid #c91624 !important;
}

.hf-editor-panel {
  position: fixed;
  z-index: 10000;
  inset: 0 0 0 auto;
  width: 318px;
  overflow-y: auto;
  color: #17344b;
  background: #fff;
  border-left: 1px solid #dbe6ee;
  box-shadow: -14px 0 40px rgba(10, 45, 70, .14);
  font: 14px/1.5 "Microsoft YaHei", "PingFang SC", sans-serif;
}

.hf-editor-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0a4f7d, #1374b4);
}

.hf-editor-head-row,
.hf-editor-actions,
.hf-editor-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hf-editor-head-row {
  justify-content: space-between;
}

.hf-editor-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.hf-editor-status {
  margin-top: 8px;
  color: rgba(255,255,255,.8);
  font-size: 12px;
}

.hf-editor-body {
  padding: 18px;
}

.hf-editor-tip {
  margin: 0 0 16px;
  padding: 11px 12px;
  color: #517087;
  background: #f1f7fb;
  border-radius: 8px;
  font-size: 12px;
}

.hf-editor-group {
  padding: 16px 0;
  border-top: 1px solid #e5edf2;
}

.hf-editor-group:first-of-type {
  border-top: 0;
}

.hf-editor-group-title {
  margin: 0 0 11px;
  color: #17344b;
  font-size: 13px;
  font-weight: 700;
}

.hf-editor-selected {
  overflow: hidden;
  color: #1374b4;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hf-editor-field {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.hf-editor-field label {
  color: #668095;
  font-size: 12px;
}

.hf-editor-field input,
.hf-editor-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 5px 8px;
  color: #17344b;
  background: #fff;
  border: 1px solid #cbdbe6;
  border-radius: 6px;
  font: inherit;
}

.hf-editor-field input[type="color"] {
  padding: 3px;
}

.hf-editor-btn {
  min-height: 36px;
  padding: 8px 12px;
  color: #17344b;
  background: #f3f7fa;
  border: 1px solid #cedce6;
  border-radius: 7px;
  cursor: pointer;
  font: 600 13px/1.2 inherit;
}

.hf-editor-btn:hover {
  background: #e8f2f8;
}

.hf-editor-btn.primary {
  color: #fff;
  background: #1374b4;
  border-color: #1374b4;
}

.hf-editor-btn.danger {
  color: #b31320;
  background: #fff5f5;
  border-color: #f0c7cb;
}

.hf-editor-btn.icon {
  min-width: 34px;
  padding: 7px;
}

.hf-editor-actions {
  flex-wrap: wrap;
}

.hf-editor-actions .hf-editor-btn {
  flex: 1 1 calc(50% - 4px);
}

.hf-editor-image-tools[hidden],
.hf-editor-text-tools[hidden] {
  display: none;
}

.hf-editor-file {
  display: none;
}

@media (max-width: 900px) {
  body.hf-edit-mode {
    padding-right: 0;
    padding-bottom: 360px;
  }

  .hf-editor-panel {
    inset: auto 0 0 0;
    width: auto;
    max-height: 360px;
    border-top: 1px solid #dbe6ee;
    border-left: 0;
  }
}
