@charset "utf-8";

/**
 * 게시판 글쓰기 — Quantum 셸
 * 모든 보드 스킨(write_form → basic 상속) 공통
 */

.bo_write {
  --qw-bg: #070d18;
  --qw-panel: rgba(10, 18, 34, 0.92);
  --qw-border: rgba(56, 189, 248, 0.28);
  --qw-border-soft: rgba(56, 189, 248, 0.14);
  --qw-text: #e2e8f0;
  --qw-muted: #94a3b8;
  --qw-cyan: #38bdf8;
  --qw-gold: #fde047;
  --qw-input: rgba(15, 23, 42, 0.88);
  --qw-radius: 14px;
  max-width: min(960px, 100%);
  margin: 0 auto 40px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.bo_write > form#fwrite,
.bo_write > form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 16px 16px 18px;
  border: 1px solid var(--qw-border);
  border-radius: var(--qw-radius);
  background:
    linear-gradient(165deg, rgba(14, 28, 52, 0.95), rgba(6, 12, 24, 0.98)) !important;
  box-sizing: border-box;
}
.sp-content-wrap:has(.bo_write) #container_title,
.sp-content-wrap:has(.bo_write) .sp-container-title {
  margin: 8px 0 12px !important;
  padding-bottom: 8px !important;
}

.bo_write > form > div {
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* base.html Hard force 가 빈 래퍼를 박스처럼 칠하던 것 차단 */
.bo_write .write_content,
.bo_write .write_editor,
.bo_write .content.ckeditor {
  background: transparent !important;
  min-height: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 옵션 */
.bo_write .write_option ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bo_write .write_option .chk_box label {
  color: var(--qw-text);
  font-size: 1.3rem;
}

/* 분류 / 작성자 */
.bo_write .write_select select,
.bo_write .write_writer .frm_input,
.bo_write .write_subject .frm_input,
.bo_write .write_link .frm_input,
.bo_write .write_file .frm_input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--qw-border) !important;
  border-radius: 10px !important;
  background: var(--qw-input) !important;
  color: var(--qw-text) !important;
  font-size: 1.45rem;
  box-sizing: border-box;
}
.bo_write .write_select select:focus,
.bo_write .frm_input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.bo_write .write_writer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .bo_write .write_writer {
    grid-template-columns: 1fr;
  }
}

/* 제목 + 임시저장 */
.bo_write .write_subject {
  position: relative;
}
.bo_write .write_subject .frm_input {
  padding-right: 168px !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bo_write .write_subject .frm_input::placeholder {
  color: var(--qw-muted);
  font-weight: 500;
}
.bo_write .write_subject #btn_autosave_list {
  top: 8px;
  right: 10px;
  height: 30px;
  line-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
}
.bo_write .write_subject #btn_autosave_list:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #fff;
}
.bo_write .write_subject #autosave_pop {
  border-color: var(--qw-border) !important;
  background: #0f172a !important;
  border-radius: 12px;
  overflow: hidden;
}

/* 본문 에디터 래퍼 — 빈 박스 금지 */
.bo_write .write_content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bo_write .write_content .write_editor {
  margin: 0;
  min-height: 0 !important;
}
.bo_write .wr_content:empty {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bo_write #char_count_desc {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--qw-border-soft);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--qw-muted);
  font-size: 1.2rem;
}
.bo_write #char_count_wrap {
  margin: 0;
  color: var(--qw-muted);
  font-size: 1.2rem;
}

/* CKEditor 크롬 — 다크 퀀텀 */
.bo_write .cke_chrome {
  border: 1px solid var(--qw-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: #0b1220 !important;
  box-shadow: none !important;
}
.bo_write .cke_inner {
  background: #0b1220 !important;
}
.bo_write .cke_top,
.bo_write .cke_bottom {
  background: linear-gradient(180deg, #122033, #0b1524) !important;
  border-color: var(--qw-border-soft) !important;
  box-shadow: none !important;
  padding: 6px 4px !important;
}
.bo_write .cke_toolgroup,
.bo_write a.cke_button {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.bo_write a.cke_button_off:hover,
.bo_write a.cke_button_on {
  background: rgba(56, 189, 248, 0.18) !important;
  border-radius: 6px !important;
}
.bo_write .cke_combo_button {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid var(--qw-border-soft) !important;
  border-radius: 6px !important;
}
.bo_write .cke_combo_text,
.bo_write .cke_button_label {
  color: #cbd5e1 !important;
}
.bo_write .cke_contents {
  min-height: 320px !important;
  background: #0b1220 !important;
  border-top: 1px solid var(--qw-border-soft) !important;
}
.bo_write .cke_wysiwyg_frame,
.bo_write .cke_wysiwyg_div {
  background: #0b1220 !important;
}
.bo_write .cke_resizer {
  border-color: transparent transparent #38bdf8 transparent !important;
}

/* 링크·파일 */
.bo_write .write_link,
.bo_write .write_file {
  border: 1px solid var(--qw-border-soft) !important;
  border-radius: 10px !important;
  background: var(--qw-input) !important;
  padding: 10px 12px 10px 44px !important;
}
.bo_write .write_link svg,
.bo_write .write_file svg {
  color: var(--qw-cyan) !important;
}
.bo_write .write_file .file_del {
  background: rgba(15, 23, 42, 0.7) !important;
  color: var(--qw-muted) !important;
  border-radius: 8px;
}

/* 버튼 */
.bo_write .btn_confirm {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px !important;
  padding-top: 14px;
  border-top: 1px solid var(--qw-border-soft);
}
.bo_write .btn_confirm .btn,
.bo_write .btn_confirm .btn_submit,
.bo_write .btn_confirm .btn_cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px !important;
  font-size: 1.4rem !important;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.bo_write .btn_cancel {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: var(--qw-border) !important;
  color: #bae6fd !important;
}
.bo_write .btn_cancel:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #fff !important;
}
.bo_write .btn_submit {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.35), rgba(14, 116, 144, 0.85)) !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  color: #f0f9ff !important;
}
.bo_write .btn_submit:hover {
  filter: brightness(1.08);
}
.bo_write .btn_submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 컨테이너 타이틀 톤 */
#container_title.sp-container-title,
.sp-content-wrap #container_title {
  color: var(--qw-gold);
  letter-spacing: 0.02em;
}
