/**
 * SunEditor - 웹블럭 CMS 커스텀 테마
 * 미니멀 플랫 디자인 — 경쟁업체 수준 UI
 */

/* ══════════════════════════════════════════
   1. CMS 글로벌 리셋 복구
   ══════════════════════════════════════════ */

.sun-editor .se-toolbar-inner,
.sun-editor .se-btn-tray {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.sun-editor .se-btn-module {
  display: inline-flex !important;
  align-items: center !important;
}

.sun-editor .se-btn-module .se-btn-module-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

/* 툴바 내부 ul (존재하는 경우) — 가로 배치 */
.sun-editor .se-toolbar ul {
  display: flex !important;
  flex-wrap: wrap !important;
}

.sun-editor .se-toolbar > ul > li,
.sun-editor .se-toolbar-inner > ul > li {
  display: inline-flex !important;
}

/* 글로벌 ul/li — 리스트 정리만 (display는 건드리지 않음, SunEditor 네이티브 동작 보호) */
.sun-editor ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sun-editor li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 에디터 콘텐츠 영역 — 리스트 스타일 복원 */
.sun-editor .se-wrapper-inner ul {
  display: block !important;
  list-style: disc !important;
  margin: 0 0 10px 0 !important;
  padding: 0 0 0 24px !important;
}

.sun-editor .se-wrapper-inner ol {
  display: block !important;
  list-style: decimal !important;
  margin: 0 0 10px 0 !important;
  padding: 0 0 0 24px !important;
}

.sun-editor .se-wrapper-inner li {
  display: list-item !important;
  list-style: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 에디터 콘텐츠 영역 — 제목 스타일 */
.sun-editor .se-wrapper-inner h1 {
  font-size: 2em !important;
  font-weight: 700 !important;
  margin: 0.67em 0 !important;
  line-height: 1.3 !important;
}

.sun-editor .se-wrapper-inner h2 {
  font-size: 1.5em !important;
  font-weight: 700 !important;
  margin: 0.83em 0 !important;
  line-height: 1.3 !important;
}

.sun-editor .se-wrapper-inner h3 {
  font-size: 1.17em !important;
  font-weight: 700 !important;
  margin: 1em 0 !important;
  line-height: 1.4 !important;
}

.sun-editor .se-wrapper-inner h4 {
  font-size: 1em !important;
  font-weight: 700 !important;
  margin: 1.33em 0 !important;
  line-height: 1.4 !important;
}

.sun-editor .se-wrapper-inner h5 {
  font-size: 0.83em !important;
  font-weight: 700 !important;
  margin: 1.67em 0 !important;
  line-height: 1.4 !important;
}

.sun-editor .se-wrapper-inner h6 {
  font-size: 0.67em !important;
  font-weight: 700 !important;
  margin: 2.33em 0 !important;
  line-height: 1.4 !important;
}

/* 에디터 콘텐츠 영역 — 인용문 */
.sun-editor .se-wrapper-inner blockquote {
  display: block !important;
  margin: 16px 0 !important;
  padding: 12px 20px !important;
  border-left: 4px solid var(--accent, #00B0FF) !important;
  background: var(--bg-light, #f8fafb) !important;
  color: var(--text-secondary, #4a5b6c) !important;
  font-style: normal !important;
}

/* 에디터 콘텐츠 영역 — 테이블 */
.sun-editor .se-wrapper-inner table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 16px 0 !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
}

.sun-editor .se-wrapper-inner table th,
.sun-editor .se-wrapper-inner table td {
  border: 1px solid var(--border-color, #dce3e8) !important;
  padding: 8px 12px !important;
  text-align: left !important;
  vertical-align: top !important;
}

.sun-editor .se-wrapper-inner table th {
  background: var(--bg-light, #f8fafb) !important;
  font-weight: 600 !important;
}

/* 에디터 콘텐츠 영역 — 코드 */
.sun-editor .se-wrapper-inner pre {
  display: block !important;
  margin: 16px 0 !important;
  padding: 16px !important;
  background: #f6f8fa !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 6px !important;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  overflow-x: auto !important;
  white-space: pre !important;
}

.sun-editor .se-wrapper-inner code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 0.9em !important;
  background: #f6f8fa !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  color: #e83e8c !important;
}

.sun-editor .se-wrapper-inner pre code {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
}

/* 에디터 콘텐츠 영역 — 수평선 */
.sun-editor .se-wrapper-inner hr {
  display: block !important;
  border: none !important;
  border-top: 1px solid var(--border-color, #dce3e8) !important;
  margin: 24px 0 !important;
  height: 0 !important;
}

/* 에디터 콘텐츠 영역 — figure / figcaption */
.sun-editor .se-wrapper-inner figure {
  display: block !important;
  margin: 16px 0 !important;
  text-align: center !important;
}

.sun-editor .se-wrapper-inner figcaption {
  display: block !important;
  margin-top: 8px !important;
  font-size: 12px !important;
  color: var(--text-muted, #8a9bac) !important;
  text-align: center !important;
}

/* 서브메뉴 드롭다운 — 세로 배치 */
.sun-editor .se-list-layer ul,
.sun-editor .se-submenu ul,
.sun-editor .se-dialog ul {
  display: block !important;
}

.sun-editor .se-list-layer li,
.sun-editor .se-submenu li,
.sun-editor .se-dialog li {
  display: block !important;
}

.sun-editor .se-controller ul {
  display: flex !important;
}

.sun-editor .se-controller li {
  display: inline-flex !important;
}

.sun-editor .se-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.sun-editor .se-btn-select {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.sun-editor {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ══════════════════════════════════════════
   2. 에디터 컨테이너
   ══════════════════════════════════════════ */

.sun-editor {
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 10px !important;
  background: var(--bg-white, #fff) !important;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  overflow: visible !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* 내부 요소에서 border-radius 클리핑 처리 */
.sun-editor .se-toolbar {
  border-radius: 10px 10px 0 0 !important;
  overflow: visible !important;
}

.sun-editor .se-wrapper {
  overflow: hidden !important;
}

.sun-editor .se-resizing-bar {
  border-radius: 0 0 10px 10px !important;
  overflow: hidden !important;
}

.sun-editor:focus-within {
  border-color: var(--accent, #00B0FF) !important;
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1) !important;
}

/* ══════════════════════════════════════════
   3. 툴바 — 플랫 미니멀 스타일
   ══════════════════════════════════════════ */

.sun-editor .se-toolbar {
  background: var(--bg-white, #fff) !important;
  border-bottom: 1px solid var(--border-color, #dce3e8) !important;
  padding: 6px 12px !important;
  outline: none !important;
  min-height: auto !important;
  box-shadow: none !important;
}

/* 툴바 그림자 제거 — 본문과 밀착 */
.sun-editor .se-toolbar-shadow {
  display: none !important;
}

/* 버튼 그룹 테두리 제거 (핵심!) */
.sun-editor .se-btn-module-border {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 1px !important;
  border-radius: 0 !important;
}

/* 구분선 — 얇고 미니멀, 부모 flex align-items:center가 수직 중앙 처리 */
.sun-editor .se-toolbar-separator-vertical {
  background-color: var(--border-color, #dce3e8) !important;
  width: 1px !important;
  height: 16px !important;
  margin: 0 6px !important;
}

/* ══════════════════════════════════════════
   4. 툴바 버튼 — 작고 깔끔한 아이콘
   ══════════════════════════════════════════ */

.sun-editor .se-btn {
  border-radius: 5px !important;
  color: var(--text-muted, #8a9bac) !important;
  transition: all 0.12s ease !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* 아이콘 크기 축소 */
.sun-editor .se-btn svg {
  width: 14px !important;
  height: 14px !important;
  fill: var(--text-muted, #8a9bac) !important;
  transition: fill 0.12s ease !important;
}

/* 호버 */
.sun-editor .se-btn:enabled:hover {
  background-color: var(--bg-light, #f8fafb) !important;
  color: var(--text-primary, #1a2b3c) !important;
  border: none !important;
}

.sun-editor .se-btn:enabled:hover svg {
  fill: var(--text-primary, #1a2b3c) !important;
}

/* 활성 상태 */
.sun-editor .se-btn:enabled:active,
.sun-editor .se-btn:enabled.active,
.sun-editor .se-btn:enabled.on {
  background-color: var(--accent-light, #e5f6ff) !important;
  color: var(--accent, #00B0FF) !important;
  border: none !important;
}

.sun-editor .se-btn:enabled:active svg,
.sun-editor .se-btn:enabled.active svg,
.sun-editor .se-btn:enabled.on svg {
  fill: var(--accent, #00B0FF) !important;
}

.sun-editor .se-btn:disabled {
  opacity: 0.3 !important;
}

/* ══════════════════════════════════════════
   5. 셀렉트 버튼 (문단 형식, 크기) — 미니멀
   ══════════════════════════════════════════ */

.sun-editor .se-btn-select {
  width: auto !important;
  min-width: auto !important;
  padding: 0 8px !important;
  height: 28px !important;
  border-radius: 5px !important;
  border: none !important;
  background: transparent !important;
  font-size: 12px !important;
  color: var(--text-muted, #8a9bac) !important;
  transition: all 0.12s ease !important;
  gap: 6px !important;
}

.sun-editor .se-btn-select .txt {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--text-muted, #8a9bac) !important;
}

.sun-editor .se-btn-select:hover {
  background: var(--bg-light, #f8fafb) !important;
  color: var(--text-primary, #1a2b3c) !important;
}

.sun-editor .se-btn-select:hover .txt {
  color: var(--text-primary, #1a2b3c) !important;
}

/* 셀렉트 버튼 활성 상태 — 현재 선택된 값 강조 */
.sun-editor .se-btn-select:enabled.active,
.sun-editor .se-btn-select:enabled.on {
  background-color: var(--accent-light, #e5f6ff) !important;
  color: var(--accent, #00B0FF) !important;
}

.sun-editor .se-btn-select:enabled.active .txt,
.sun-editor .se-btn-select:enabled.on .txt {
  color: var(--accent, #00B0FF) !important;
}

.sun-editor .se-btn-select:enabled.active svg,
.sun-editor .se-btn-select:enabled.on svg {
  fill: var(--accent, #00B0FF) !important;
}

/* 셀렉트 화살표 아이콘 */
.sun-editor .se-btn-select svg {
  width: 10px !important;
  height: 10px !important;
}

/* ══════════════════════════════════════════
   6. 드롭다운 — 깔끔한 팝업
   ══════════════════════════════════════════ */

.sun-editor .se-list-layer {
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  background: var(--bg-white, #fff) !important;
  overflow: visible !important;
  padding: 4px !important;
}

/* 드롭다운 내부 — 스크롤 (uni-scrollbar 동일) */
.sun-editor .se-list-layer .se-list-inner {
  max-height: 280px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px !important;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color, #dce3e8) transparent;
}

.sun-editor .se-list-layer .se-list-inner::-webkit-scrollbar { width: 4px; }
.sun-editor .se-list-layer .se-list-inner::-webkit-scrollbar-thumb { background: var(--border-color, #dce3e8); border-radius: 4px; }

.sun-editor .se-list-layer .se-btn-list {
  border-radius: 5px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  color: var(--text-secondary, #4a5b6c) !important;
  transition: all 0.1s ease !important;
  margin: 1px 0 !important;
}

.sun-editor .se-list-layer .se-btn-list:hover {
  background-color: var(--accent-light, #e5f6ff) !important;
  color: var(--accent, #00B0FF) !important;
}

.sun-editor .se-list-layer .se-btn-list.active,
.sun-editor .se-list-layer .se-btn-list.on,
.sun-editor .se-list-inner .se-list-basic li button.active {
  background-color: var(--accent-light, #e5f6ff) !important;
  color: var(--accent, #00B0FF) !important;
  font-weight: 600 !important;
  border: none !important;
}

/* ══════════════════════════════════════════
   7. 에디터 본문
   ══════════════════════════════════════════ */

.sun-editor .se-wrapper {
  background: var(--bg-white, #fff) !important;
}

.sun-editor .se-wrapper .se-wrapper-inner {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 14px !important;
  color: var(--text-primary, #1a2b3c) !important;
  line-height: 1.7 !important;
  padding: 20px 24px !important;
  background: var(--bg-white, #fff) !important;
}

.sun-editor-editable {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 14px !important;
  color: var(--text-primary, #1a2b3c) !important;
  line-height: 1.7 !important;
}

.sun-editor .se-wrapper .se-placeholder {
  font-size: 14px !important;
  color: var(--text-placeholder, #b8c5d0) !important;
  font-style: normal !important;
  padding: 20px 24px !important;
}

/* ══════════════════════════════════════════
   8. 하단 리사이즈 바
   ══════════════════════════════════════════ */

.sun-editor .se-resizing-bar {
  background: var(--bg-light, #f8fafb) !important;
  border-top: 1px solid var(--border-color, #dce3e8) !important;
  height: 16px !important;
  min-height: 16px !important;
}

.sun-editor .se-resizing-bar .se-navigation {
  font-size: 10px !important;
  color: var(--text-muted, #8a9bac) !important;
  padding: 0 12px !important;
}

/* ══════════════════════════════════════════
   9. 다이얼로그 (링크, 이미지) — uni-modal 스타일
   ══════════════════════════════════════════ */

/* 커스텀 다이얼로그 사용 — SunEditor 기본 다이얼로그 JS 오버라이드로 차단 */
/* opacity/pointer-events 제거: SunEditor 내부 상태(modalForm) 오염 방지 */
.sun-editor .se-dialog {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.sun-editor .se-dialog .se-dialog-back {
  background: rgba(0, 0, 0, 0.4) !important;
}

.sun-editor .se-dialog .se-dialog-inner .se-dialog-content {
  border-radius: 12px !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
  overflow: hidden !important;
  max-width: 460px !important;
}

.sun-editor .se-dialog .se-dialog-header {
  background: var(--bg-white, #fff) !important;
  border-bottom: 1px solid var(--border-color, #dce3e8) !important;
  padding: 20px 24px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text-primary, #1a2b3c) !important;
}

.sun-editor .se-dialog .se-dialog-header .se-dialog-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  transition: background 0.15s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sun-editor .se-dialog .se-dialog-header .se-dialog-close:hover {
  background: var(--bg-light, #f8fafb) !important;
}

.sun-editor .se-dialog .se-dialog-header .se-dialog-close svg {
  fill: var(--text-muted, #8a9bac) !important;
  width: 12px !important;
  height: 12px !important;
}

.sun-editor .se-dialog .se-dialog-body {
  padding: 20px 24px !important;
  background: var(--bg-white, #fff) !important;
}

.sun-editor .se-dialog .se-dialog-body label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-primary, #1a2b3c) !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.sun-editor .se-dialog .se-dialog-body .se-input-form {
  height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  color: var(--text-primary, #1a2b3c) !important;
  background: var(--bg-white, #fff) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sun-editor .se-dialog .se-dialog-body .se-input-form:focus {
  border-color: var(--accent, #00B0FF) !important;
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1) !important;
}

.sun-editor .se-dialog .se-dialog-body select {
  height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  color: var(--text-primary, #1a2b3c) !important;
  background: var(--bg-white, #fff) !important;
  outline: none !important;
}

.sun-editor .se-dialog .se-dialog-body select:focus {
  border-color: var(--accent, #00B0FF) !important;
  box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.1) !important;
}

.sun-editor .se-dialog .se-dialog-body input[type="checkbox"] {
  accent-color: var(--accent, #00B0FF) !important;
}

.sun-editor .se-dialog .se-dialog-footer {
  padding: 16px 24px 20px !important;
  border-top: 1px solid var(--border-color, #dce3e8) !important;
  background: var(--bg-white, #fff) !important;
}

.sun-editor .se-dialog .se-dialog-footer .se-btn-primary {
  background: var(--accent, #00B0FF) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  height: 36px !important;
  padding: 0 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}

.sun-editor .se-dialog .se-dialog-footer .se-btn-primary:hover {
  background: var(--accent-hover, #0095d9) !important;
}

.sun-editor .se-dialog .se-dialog-footer button:not(.se-btn-primary) {
  background: var(--bg-white, #fff) !important;
  color: var(--text-secondary, #4a5b6c) !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 8px !important;
  height: 36px !important;
  padding: 0 20px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
}

.sun-editor .se-dialog .se-dialog-footer button:not(.se-btn-primary):hover {
  background: var(--bg-light, #f8fafb) !important;
  border-color: var(--text-muted, #8a9bac) !important;
}

/* ══════════════════════════════════════════
   10. 컨트롤러 (이미지/동영상 선택 시 플로팅 바)
   ══════════════════════════════════════════ */

.sun-editor .se-controller {
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.05) !important;
  background: var(--bg-white, #fff) !important;
  padding: 4px !important;
}

/* 말풍선 화살표 제거 */
.sun-editor .se-controller .se-arrow,
.sun-editor .se-controller .se-arrow::after {
  display: none !important;
}

/* 컨트롤러 내부 버튼 */
.sun-editor .se-controller .se-btn {
  border-radius: 6px !important;
}

.sun-editor .se-controller .se-btn-group button:enabled.active,
.sun-editor .se-controller .se-btn-group button:enabled.on {
  color: var(--accent, #00B0FF) !important;
  outline: none !important;
}

/* ══════════════════════════════════════════
   11. 코드뷰
   ══════════════════════════════════════════ */

.sun-editor .se-wrapper .se-wrapper-code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-size: 13px !important;
  color: var(--text-primary, #1a2b3c) !important;
  background: #fafbfc !important;
  padding: 20px 24px !important;
  line-height: 1.6 !important;
  border: none !important;
}

/* ══════════════════════════════════════════
   12. 풀스크린
   ══════════════════════════════════════════ */

.sun-editor.sun-editor-fullscreen {
  z-index: 10000 !important;
}

/* ══════════════════════════════════════════
   13. 이미지/동영상 — 선택/리사이즈 스타일
   ══════════════════════════════════════════ */

/* 점선/배경 완전 제거 */
.sun-editor .se-wrapper .se-component {
  border: none !important;
  outline: none !important;
}

.sun-editor .se-wrapper .se-component.__se__selected {
  outline: 2px solid var(--accent, #00B0FF) !important;
  outline-offset: 2px !important;
}

/* 리사이즈 핸들 — 깔끔한 스타일 */
.sun-editor .se-resize-dot {
  background: transparent !important;
}

.sun-editor .se-resize-dot .se-resize-dot-inner {
  border: 2px solid var(--accent, #00B0FF) !important;
  background: transparent !important;
}

.sun-editor .se-resize-dot .se-resize-dot-inner span {
  background: var(--accent, #00B0FF) !important;
  border: none !important;
  width: 8px !important;
  height: 8px !important;
}

/* figure/iframe 감싸는 점선 제거 */
.sun-editor .se-wrapper figure,
.sun-editor .se-wrapper .se-component figure {
  border: none !important;
  outline: none !important;
}

.sun-editor .se-wrapper iframe {
  border: none !important;
}

/* 동영상 컨테이너 — SunEditor 네이티브 형식 지원 */
.sun-editor .se-wrapper .se-video-container {
  display: block !important;
  margin: 12px 0 !important;
}

.sun-editor .se-wrapper .se-video-inner {
  position: relative !important;
  width: 100% !important;
  padding-bottom: 56.25% !important;
}

.sun-editor .se-wrapper .se-video-inner iframe,
.sun-editor .se-wrapper .se-video-inner video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* 리사이즈 컨테이너 — 투명 배경만 */
.sun-editor .se-resizing-container {
  border: none !important;
  outline: none !important;
  background: transparent !important;
}

.sun-editor .se-resizing-container .se-resize-display {
  background: transparent !important;
}

/* 리사이즈 backdrop */
.sun-editor .se-resizing-back {
  background: transparent !important;
}

/* ══════════════════════════════════════════
   14. 툴팁 — 미니멀
   ══════════════════════════════════════════ */

.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text {
  background: #333b48 !important;
  color: #fff !important;
  border-radius: 5px !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.sun-editor .se-tooltip .se-tooltip-inner .se-tooltip-text::after {
  border-bottom-color: #333b48 !important;
}

/* ══════════════════════════════════════════
   15. 색상 팔레트
   ══════════════════════════════════════════ */

.sun-editor .se-list-layer.se-list-font-color,
.sun-editor .se-list-layer.se-list-font-backgroundColor {
  padding: 8px !important;
}

/* 색상 팔레트는 스크롤/높이 제한 해제 */
.sun-editor .se-list-layer.se-list-font-color .se-list-inner,
.sun-editor .se-list-layer.se-list-font-backgroundColor .se-list-inner {
  max-height: none !important;
  overflow: visible !important;
}

/* 글로벌 리셋(display:block) 보정 — 색상 그리드 복원 */
.sun-editor .se-color-pallet {
  display: flex !important;
  flex-wrap: wrap !important;
}

.sun-editor .se-color-pallet li {
  display: inline-flex !important;
}

/* HEX 입력 폼 */
.sun-editor .se-form-group {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid var(--border-color, #dce3e8) !important;
}

/* HEX 입력 필드 */
.sun-editor .se-color-input {
  flex: 1 !important;
  height: 34px !important;
  padding: 0 10px !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
  color: var(--text-primary, #1a2b3c) !important;
  background: var(--bg-white, #fff) !important;
  outline: none !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.sun-editor .se-color-input:focus {
  border-color: var(--accent, #00B0FF) !important;
}

/* 적용 버튼 (체크 아이콘) */
.sun-editor .se-form-group button[type="submit"],
.sun-editor .se-form-group ._se_color_picker_submit {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  border: none !important;
  background: var(--accent, #00B0FF) !important;
  color: #fff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.sun-editor .se-form-group button[type="submit"]:hover,
.sun-editor .se-form-group ._se_color_picker_submit:hover {
  background: var(--accent-hover, #0095d9) !important;
}

.sun-editor .se-form-group button[type="submit"] svg,
.sun-editor .se-form-group ._se_color_picker_submit svg {
  width: 15px !important;
  height: 15px !important;
  fill: #fff !important;
}

/* 형식제거 버튼 (지우개 아이콘) */
.sun-editor .se-form-group ._se_color_picker_remove {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  border: 1px solid var(--border-color, #dce3e8) !important;
  background: var(--bg-white, #fff) !important;
  color: var(--text-muted, #8a9bac) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.sun-editor .se-form-group ._se_color_picker_remove:hover {
  background: var(--bg-light, #f8fafb) !important;
  border-color: var(--text-muted, #8a9bac) !important;
}

.sun-editor .se-form-group ._se_color_picker_remove svg {
  width: 15px !important;
  height: 15px !important;
  fill: currentColor !important;
}

/* ══════════════════════════════════════════
   16. 사이드패널 내 에디터
   ══════════════════════════════════════════ */

.editor-wrap .sun-editor {
  margin-top: 8px;
}

/* ══════════════════════════════════════════
   17. 스크롤바
   ══════════════════════════════════════════ */

.sun-editor .se-wrapper-inner::-webkit-scrollbar {
  width: 4px;
}

.sun-editor .se-wrapper-inner::-webkit-scrollbar-track {
  background: transparent;
}

.sun-editor .se-wrapper-inner::-webkit-scrollbar-thumb {
  background: var(--border-color, #dce3e8);
  border-radius: 4px;
}

.sun-editor .se-wrapper-inner::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #8a9bac);
}
