/**
 * spacea.kr 게시판 화면 보정. KBoard 스킨/코어는 건드리지 않는다.
 * 다른 사이트에는 이 파일을 올리지 않거나, PHP에서 spacea.kr 일 때만 불러온다.
 */

/* ------------------------------------------------------------------
   1) 좋아요 / 싫어요 / 인쇄
   원인: spacea-platform-core site.css 의 `.spa-main button { color:#fff!important }`
   가 게시글 하단 버튼에도 새고, 사진 게시판 스킨은 배경을 투명으로 되돌려
   흰 바탕에 흰 글자가 된다. 기본 스킨에서는 남색 알약으로 바뀐다.
   ------------------------------------------------------------------ */
body.spa-platform .kboard-document-action .kboard-button-action,
body.spa-platform #kboard-default-document .kboard-button-action,
body.spa-platform #kboard-ocean-gallery-document .kboard-button-action,
body.spa-platform #kboard-inside-ask-document .kboard-button-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 40px !important;
  height: auto !important;
  padding: 8px 14px !important;
  margin: 0 8px 0 0 !important;
  border-radius: 10px !important;
  border: 1px solid #d5dce6 !important;
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  font-family: Paperlogy, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  text-shadow: none !important;
  transform: none !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

body.spa-platform .kboard-document-action .kboard-button-like,
body.spa-platform #kboard-default-document .kboard-button-like,
body.spa-platform #kboard-ocean-gallery-document .kboard-button-like,
body.spa-platform #kboard-inside-ask-document .kboard-button-like {
  color: #c62828 !important;
  -webkit-text-fill-color: #c62828 !important;
}

body.spa-platform .kboard-document-action .kboard-button-unlike,
body.spa-platform #kboard-default-document .kboard-button-unlike,
body.spa-platform #kboard-ocean-gallery-document .kboard-button-unlike,
body.spa-platform #kboard-inside-ask-document .kboard-button-unlike {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}

body.spa-platform .kboard-document-action .kboard-button-print,
body.spa-platform #kboard-default-document .kboard-button-print,
body.spa-platform #kboard-ocean-gallery-document .kboard-button-print,
body.spa-platform #kboard-inside-ask-document .kboard-button-print {
  color: #0b1f3a !important;
  -webkit-text-fill-color: #0b1f3a !important;
}

body.spa-platform .kboard-document-action .kboard-button-action:hover,
body.spa-platform .kboard-document-action .kboard-button-action:focus-visible {
  background: #f3f7f9 !important;
  background-color: #f3f7f9 !important;
  border-color: #b7d1d8 !important;
  transform: none !important;
}

/* ------------------------------------------------------------------
   2) 목록·글쓰기·수정 화면의 큰 버튼
   돌아가기 / 목록보기 / 저장하기 / 글쓰기 / 글수정 / 글삭제 등.
   사진 게시판 스킨은 font-size:12px!important, height:28px 이라 작아 보인다.
   삭제된 spacea-board-controls 플러그인에는 이 스타일이 없었다.
   ------------------------------------------------------------------ */
body.spa-platform .spa-kboard .kboard-control a,
body.spa-platform .spa-kboard .kboard-control button,
body.spa-platform .spa-kboard .kboard-control input[type=submit],
body.spa-platform .spa-kboard a.kboard-default-button-small,
body.spa-platform .spa-kboard button.kboard-default-button-small,
body.spa-platform .spa-kboard input.kboard-default-button-small,
body.spa-platform .spa-kboard a.kboard-ocean-gallery-button-small,
body.spa-platform .spa-kboard button.kboard-ocean-gallery-button-small,
body.spa-platform .spa-kboard input.kboard-ocean-gallery-button-small,
body.spa-platform .spa-kboard a.kboard-inside-ask-button-small,
body.spa-platform .spa-kboard button.kboard-inside-ask-button-small,
body.spa-platform .spa-kboard input.kboard-inside-ask-button-small {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  border: 1px solid #0b1f3a !important;
  background: #0b1f3a !important;
  background-color: #0b1f3a !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: Paperlogy, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: 0 8px 18px rgba(11, 31, 58, 0.16) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

body.spa-platform .spa-kboard .kboard-control a:hover,
body.spa-platform .spa-kboard .kboard-control button:hover,
body.spa-platform .spa-kboard .kboard-control input[type=submit]:hover,
body.spa-platform .spa-kboard a.kboard-default-button-small:hover,
body.spa-platform .spa-kboard button.kboard-default-button-small:hover,
body.spa-platform .spa-kboard a.kboard-ocean-gallery-button-small:hover,
body.spa-platform .spa-kboard button.kboard-ocean-gallery-button-small:hover,
body.spa-platform .spa-kboard a.kboard-inside-ask-button-small:hover,
body.spa-platform .spa-kboard button.kboard-inside-ask-button-small:hover {
  background: #12284a !important;
  background-color: #12284a !important;
  border-color: #12284a !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  transform: none !important;
  opacity: 1 !important;
}

/* 편집기 툴바·미디어 단추는 원래 작은 모양을 유지한다 */
body.spa-platform .spa-main .wp-editor-wrap .button,
body.spa-platform .spa-main .wp-media-buttons .button,
body.spa-platform .spa-main .wp-editor-tools .button,
body.spa-platform .spa-main .wp-switch-editor,
body.spa-platform .spa-main .quicktags-toolbar input.button,
body.spa-platform .spa-main .quicktags-toolbar input[type=button],
body.spa-platform .spa-main .quicktags-toolbar button,
body.spa-platform .spa-main #qt_kboard_content_toolbar input,
body.spa-platform .spa-main #qt_kboard_content_toolbar button,
body.spa-platform .spa-main .mce-toolbar .mce-btn,
body.spa-platform .spa-main .mce-toolbar .mce-btn button,
body.spa-platform .spa-main .mce-btn button {
  min-height: 0 !important;
  height: auto !important;
  padding: 2px 8px !important;
  border-radius: 3px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 2 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

/* 이전/다음 글 안내: 큰 글씨, 제목이 가운데서 깨지지 않게 */
body.spa-platform .kboard-document-navi a,
body.spa-platform #kboard-default-document .kboard-document-navi a,
body.spa-platform #kboard-ocean-gallery-document .kboard-document-navi a,
body.spa-platform #kboard-inside-ask-document .kboard-document-navi a {
  min-height: 44px !important;
  padding: 12px 16px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  letter-spacing: -0.01em !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  box-sizing: border-box !important;
  color: #0b1f3a !important;
  -webkit-text-fill-color: #0b1f3a !important;
}

/* ------------------------------------------------------------------
   3) 내용 편집기 높이·크기 조절
   사진 게시판 편집 CSS가 textarea/wp-editor-area 에 height:auto!important
   를 걸어, 모서리 드래그로 높이를 바꿔도 즉시 되돌아간다.
   이 파일만으로는 !important 높이를 “없는 것처럼” 만들 수 없어
   초기 높이는 min-height 로 주고, 드래그는 함께 실리는 JS가 처리한다.
   ------------------------------------------------------------------ */
body.spa-platform #kboard-default-editor textarea,
body.spa-platform #kboard-default-editor .wp-editor-area,
body.spa-platform #kboard-ocean-gallery-editor textarea,
body.spa-platform #kboard-ocean-gallery-editor .wp-editor-area,
body.spa-platform #kboard-inside-ask-editor textarea,
body.spa-platform #kboard-inside-ask-editor .wp-editor-area,
body.spa-platform .spa-kboard textarea.wp-editor-area {
  min-height: 320px !important;
  max-height: none !important;
  resize: vertical !important;
  overflow: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.spa-platform .spa-kboard .wp-editor-container,
body.spa-platform .spa-kboard .mce-tinymce,
body.spa-platform .spa-kboard .mce-edit-area,
body.spa-platform .spa-kboard .mce-edit-area iframe,
body.spa-platform .spa-kboard iframe[id$="_ifr"] {
  min-height: 320px !important;
  max-height: none !important;
}
