/*
 * YJ 공지·교육안내 홈페이지 공통틀 브리지 V1.2.4
 * Loaded only on the verified KBoard 7 notice page.
 */

body.yj-kboard-notice-bridge {
  --yj-notice-ink: #163448;
  --yj-notice-blue: #0878a8;
  --yj-notice-line: #d8e3e9;
  --yj-notice-surface: #f6f9fb;
  --yj-notice-muted: #667b89;
  --yj-notice-width: 1180px;
}

/*
 * The page template now owns the outer document. The existing homepage header,
 * menu and footer remain fixed while only this central content area changes
 * between KBoard list, document and editor modes.
 */
body.yj-kboard-notice-common-shell {
  min-width: 0;
  margin: 0 !important;
  background: #f5f7f9 !important;
}

body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-main {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 420px;
  margin: 0 !important;
  padding: 20px 0 42px !important;
  background: #f5f7f9;
  box-sizing: border-box !important;
}

body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 24px !important;
  align-items: start !important;
  width: min(var(--yj-notice-width), calc(100% - 40px)) !important;
  max-width: var(--yj-notice-width) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-content,
body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-content > .entry-content,
body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-content > .wp-block-post-content,
body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-content > .elementor {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.yj-kboard-notice-common-shell .yj-kboard-load-message {
  min-height: 220px;
  padding: 72px 24px;
  border: 1px solid var(--yj-notice-line);
  background: #fff;
  color: var(--yj-notice-ink);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-layout .yj-kboard-content-frame,
body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-layout .yj-kboard-board-root,
body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-layout .yj-kboard-board-frame {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

body.yj-kboard-notice-common-shell .site-header,
body.yj-kboard-notice-common-shell .site-footer {
  width: 100%;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .site-header {
  position: relative;
  z-index: 1000;
}

body.yj-kboard-notice-common-shell .site-footer {
  margin-top: 0;
}

body.yj-kboard-notice-common-shell .main-menu.active::after,
body.yj-kboard-notice-common-shell .main-menu::after {
  display: none !important;
  content: none !important;
}

body.yj-kboard-notice-common-shell .site-header a,
body.yj-kboard-notice-common-shell .site-footer a {
  text-decoration: none;
}

/* V1.2.2: 공통메뉴 아래의 중복 「공지 · 교육안내」 대형 배너 제거. */
body.yj-kboard-notice-common-shell .yj-kboard-page-hero {
  display: none !important;
}

body.yj-kboard-notice-bridge .yj-kboard-content-frame,
body.yj-kboard-notice-bridge .yj-kboard-page-hero {
  width: min(var(--yj-notice-width), calc(100% - 40px)) !important;
  max-width: var(--yj-notice-width) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

body.yj-kboard-notice-bridge .yj-kboard-content-frame {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body.yj-kboard-notice-bridge .yj-kboard-side-column {
  display: none !important;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-menu {
  padding: 20px 16px 12px;
  border: 1px solid #d8e3e9;
  background: #fff;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yj-notice-blue);
}

body.yj-kboard-notice-common-shell .yj-kboard-support-heading span {
  display: block;
  margin-bottom: 5px;
  color: var(--yj-notice-blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-heading h2 {
  margin: 0;
  color: var(--yj-notice-ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-links li {
  margin: 0;
  border-bottom: 1px solid #e0e8ed;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-links li:last-child {
  border-bottom: 0;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-links a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  color: var(--yj-notice-ink);
  text-decoration: none;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #cde1eb;
  background: #f7fbfd;
  color: var(--yj-notice-blue);
  font-size: 9px;
  font-weight: 700;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-copy {
  display: block;
  min-width: 0;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-copy strong,
body.yj-kboard-notice-common-shell .yj-kboard-support-copy small {
  display: block;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-copy strong {
  color: var(--yj-notice-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-copy small {
  margin-top: 3px;
  color: #78909e;
  font-size: 10px;
  line-height: 1.4;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-links a:hover strong,
body.yj-kboard-notice-common-shell .yj-kboard-support-links a:focus strong {
  color: var(--yj-notice-blue);
}

body.yj-kboard-notice-common-shell .yj-kboard-support-phone {
  padding: 18px 16px;
  border-top: 2px solid var(--yj-notice-blue);
  background: #eaf5fa;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-phone span,
body.yj-kboard-notice-common-shell .yj-kboard-support-phone small {
  display: block;
  color: #627d8d;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-phone span {
  margin-bottom: 8px;
  font-size: 12px;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-phone a {
  display: block;
  margin-bottom: 7px;
  color: #0577a7;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-phone small {
  font-size: 10px;
  line-height: 1.4;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-poster {
  width: 100%;
  margin: 0;
  border: 1px solid #d8e3e9;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-poster button,
body.yj-kboard-notice-common-shell .yj-kboard-support-poster img {
  display: block;
  width: 100%;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-poster button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

body.yj-kboard-notice-common-shell .yj-kboard-support-poster img {
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #fff;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-modal[hidden] {
  display: none !important;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 999999;
  display: block;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 24px);
  border: 1px solid #cbdbe4;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 52, 72, 0.28);
  overflow: hidden;
  box-sizing: border-box;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 8px 0 16px;
  color: #fff;
  background: #164763;
  cursor: move;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-window-bar.is-dragging {
  cursor: grabbing;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-window-bar strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-window-body {
  overflow: auto;
  background: #fff;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-window-body > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 118px);
  object-fit: contain;
  background: #fff;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0 0 3px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.yj-kboard-notice-common-shell .yj-kboard-poster-detail-link {
  display: block;
  padding: 14px 18px;
  color: #fff;
  background: #164763;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

body.yj-kboard-notice-bridge .yj-kboard-primary-column {
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 100% !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

body.yj-kboard-notice-bridge .yj-kboard-board-root,
body.yj-kboard-notice-bridge .yj-kboard-board-frame {
  width: 100% !important;
  max-width: var(--yj-notice-width) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

body.yj-kboard-notice-bridge .yj-kboard-page-hero {
  min-height: 0 !important;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
}

body.yj-kboard-notice-bridge .yj-kboard-page-hero h1,
body.yj-kboard-notice-bridge .yj-kboard-page-hero h2,
body.yj-kboard-notice-bridge .yj-kboard-page-hero h3,
body.yj-kboard-notice-bridge .yj-kboard-page-hero strong {
  color: var(--yj-notice-ink) !important;
  line-height: 1.35 !important;
}

body.yj-kboard-notice-bridge [id^="kboard-"][id$="-list"],
body.yj-kboard-notice-bridge [id^="kboard-"][id$="-document"],
body.yj-kboard-notice-bridge [id^="kboard-"][id$="-editor"],
body.yj-kboard-notice-bridge .kboard-list,
body.yj-kboard-notice-bridge .kboard-document-wrap,
body.yj-kboard-notice-bridge .kboard-editor,
body.yj-kboard-notice-bridge .kboard-form {
  width: 100% !important;
  max-width: var(--yj-notice-width) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

/*
 * V1.0.1 added a second outer border to the whole document.
 * V1.0.2 leaves the original KBoard skin border untouched and only controls spacing.
 */
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .yj-kboard-board-frame {
  margin-top: 16px !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] {
  margin-top: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-document-wrap {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] .kboard-title {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 20px 28px 14px !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] .kboard-title h1,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] .kboard-title h2 {
  margin: 0 !important;
  color: var(--yj-notice-ink) !important;
  font-size: clamp(23px, 2.2vw, 30px) !important;
  line-height: 1.45 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] .kboard-detail {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 12px 28px !important;
  background: var(--yj-notice-surface) !important;
}

/* Document-body protection: no hidden, zero-height or transparent content state. */
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 24px 28px !important;
  color: var(--yj-notice-ink) !important;
  background: #fff !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
  overflow-wrap: anywhere;
  word-break: keep-all;
  box-sizing: border-box !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view > :first-child,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view > :first-child > :first-child {
  margin-top: 0 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view > :last-child,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view > :last-child > :last-child {
  margin-bottom: 0 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view > * {
  visibility: visible !important;
  opacity: 1 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view p,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view div,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view span,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view li,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view td,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view th,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view blockquote {
  color: var(--yj-notice-ink) !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view a {
  color: var(--yj-notice-blue) !important;
}

/* A genuinely empty saved post is labelled instead of showing an unexplained blank box. */
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view.yj-kboard-content-empty {
  min-height: 0 !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view.yj-kboard-content-empty::before {
  content: "등록된 본문 내용이 없습니다.";
  display: block;
  padding: 14px 16px;
  color: var(--yj-notice-muted);
  border: 1px solid var(--yj-notice-line);
  background: var(--yj-notice-surface);
  font-size: 15px;
  line-height: 1.6;
  box-sizing: border-box;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-control,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-document-navi,
body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-comments-area {
  padding-right: 28px !important;
  padding-left: 28px !important;
  box-sizing: border-box !important;
}

/* The same print command remains in the main control row. */
body.yj-kboard-notice-bridge .yj-kboard-duplicate-print-row,
body.yj-kboard-notice-bridge .yj-kboard-print-only-row {
  display: none !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-control {
  min-height: 0 !important;
  margin: 0 !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-document-navi {
  min-height: 0 !important;
  margin: 0 !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

body.yj-kboard-notice-bridge .kboard-list table {
  width: 100% !important;
  border-collapse: collapse;
}

body.yj-kboard-notice-bridge .kboard-list thead th {
  color: var(--yj-notice-ink);
  background: var(--yj-notice-surface);
}

body.yj-kboard-notice-bridge .kboard-list tbody td,
body.yj-kboard-notice-bridge .kboard-list thead th {
  border-color: var(--yj-notice-line) !important;
}

body.yj-kboard-notice-bridge .kboard-list-title,
body.yj-kboard-notice-bridge .kboard-list-title a {
  color: var(--yj-notice-ink);
}

body.yj-kboard-notice-bridge .kboard-pagination .active a,
body.yj-kboard-notice-bridge .kboard-pagination .active span {
  border-color: var(--yj-notice-blue) !important;
  background: var(--yj-notice-blue) !important;
}

@media (max-width: 760px) {
  body.yj-kboard-notice-bridge .yj-kboard-content-frame,
  body.yj-kboard-notice-bridge .yj-kboard-page-hero {
    width: calc(100% - 24px) !important;
  }

  body.yj-kboard-notice-bridge .yj-kboard-page-hero {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  body.yj-kboard-notice-bridge .yj-kboard-board-frame {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] .kboard-title,
  body.yj-kboard-notice-bridge.yj-kboard-notice-view-document [id^="kboard-"][id$="-document"] .kboard-detail,
  body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-content .content-view,
  body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-control,
  body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-document-navi,
  body.yj-kboard-notice-bridge.yj-kboard-notice-view-document .kboard-comments-area {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  body.yj-kboard-notice-bridge .kboard-list-uid,
  body.yj-kboard-notice-bridge .kboard-list-user,
  body.yj-kboard-notice-bridge .kboard-list-vote,
  body.yj-kboard-notice-bridge .kboard-list-view {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body.yj-kboard-notice-common-shell .yj-kboard-notice-shell-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    width: calc(100% - 24px) !important;
  }

  body.yj-kboard-notice-common-shell .yj-kboard-support-sidebar {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}
