/* Editable system 「說明」 (works with .htfl-guide) */

.htfl-system-guide-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  max-width: 44rem;
}

.htfl-system-guide-toolbar[hidden] {
  display: none !important;
}

.htfl-system-guide-toolbar .btn {
  font-size: 13px;
  padding: 6px 10px;
}

.htfl-system-guide-toolbar-sep {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
  margin: 0 2px;
}

.htfl-system-guide-status {
  margin-left: auto;
  font-size: 12px;
  color: #64748b;
}

.htfl-guide.htfl-system-guide-body.is-editing,
.htfl-system-guide-body.is-editing {
  outline: 2px solid #93c5fd;
  outline-offset: 4px;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.htfl-system-guide-edit-tools {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.htfl-system-guide-toolbar.is-editing .htfl-system-guide-edit-tools {
  display: flex;
}

.htfl-system-guide-toolbar.is-editing .htfl-system-guide-view-tools {
  display: none;
}

.htfl-sg-editors-modal .htfl-sg-editors-search {
  width: 100%;
  max-width: 360px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

.htfl-sg-editors-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.htfl-sg-editors-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font-size: 14px;
  cursor: pointer;
}

.htfl-sg-editors-item[hidden] {
  display: none !important;
}

.htfl-sg-editors-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

#htfl-sg-editors-modal.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 12000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}
#htfl-sg-editors-modal.modal.is-open {
  display: flex;
}
#htfl-sg-editors-modal .modal-content {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}
#htfl-sg-editors-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}
#htfl-sg-editors-modal .modal-header h3 {
  margin: 0;
  font-size: 16px;
}
#htfl-sg-editors-modal .modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
#htfl-sg-editors-modal .modal-body {
  padding: 14px 16px;
}
#htfl-sg-editors-modal .modal-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
