.my-accordion-group {
  margin: 16px 0;
}

.my-accordion {
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  background: #f9fafb;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
  text-align: left;
}

.accordion-header-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.accordion-title {
  font-size: 16px;
  font-weight: 600;
  color: inherit;
  line-height: 1.4;
}

.accordion-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.3;
}

.accordion-header:hover {
  background: #f3f4f6;
}

/* 只在编辑器中显示焦点样式 */
.wp-admin .accordion-header:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

/* 前端隐藏焦点轮廓，使用背景色变化 */
.accordion-header:focus {
  background: #f3f4f6;
  outline: none;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  stroke: #4b5563;
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s ease;
}

.my-accordion.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}

.my-accordion.active .accordion-body {
  max-height: 500px;
  opacity: 1;
}

.accordion-content {
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 简洁编辑器预览样式 */
.accordion-simple-preview {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.accordion-simple-preview:hover {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.preview-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.accordion-simple-preview:hover .preview-title {
  color: #1e40af;
}

.preview-content {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  font-style: italic;
  transition: color 0.3s ease;
}

.accordion-simple-preview:hover .preview-content {
  color: #4b5563;
}


/* 弹窗样式 */
.accordion-edit-modal .components-modal__content {
  max-width: 600px;
  width: 90vw;
}

.accordion-edit-modal .components-modal__header {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px;
}

.accordion-edit-modal .components-modal__header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.modal-content {
  padding: 24px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field:last-of-type {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  letter-spacing: 0.025em;
}

.title-control input[type="text"],
.subtitle-control input[type="text"],
.content-control textarea {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  transition: all 0.2s ease !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.title-control input[type="text"]:focus,
.subtitle-control input[type="text"]:focus,
.content-control textarea:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.title-control input[type="text"] {
  font-weight: 600 !important;
}

.content-control textarea {
  min-height: 120px !important;
  resize: vertical !important;
  font-family: inherit !important;
}

/* 快捷键提示 */
.keyboard-shortcuts {
  text-align: center;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}

.keyboard-shortcuts small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid #f3f4f6;
  margin-top: 20px;
}

.modal-actions .cancel-button {
  margin-right: auto;
}

.modal-actions .save-button {
  margin-left: auto;
}

.cancel-button,
.save-button {
  padding: 10px 20px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  border: none !important;
  cursor: pointer !important;
}

.cancel-button {
  background: #f3f4f6 !important;
  color: #374151 !important;
}

.cancel-button:hover {
  background: #e5e7eb !important;
}

.save-button {
  background: #3b82f6 !important;
  color: #fff !important;
}

.save-button:hover {
  background: #2563eb !important;
}
