/* (사)한국용접기술인협회 — site.css : 퍼블리싱 CSS 에 없던 서버 연동 화면 요소.
   퍼블리싱 css(style · sub · member · intro)는 손대지 않고, 모든 페이지에서 그 뒤에 불러온다 (front/fragments/layout :: head).
   들어 있는 것: 로그아웃 폼 · 봇 함정 칸 · 폼 안내 문구 자리 · 협회소식 썸네일 없음 · 관리자 본문(.rte) · 메인 팝업 · 새 비밀번호 화면 */

/* ---------- 헤더 · 모바일 메뉴의 로그아웃 (퍼블리싱의 button[data-logout] 을 POST 폼으로 감쌌다) ----------
   헤더: 폼이 .member-util 의 자식 자리(구분선 · 간격)를 그대로 받는다
   모바일 메뉴: 폼은 상자를 만들지 않고(display:contents) 안의 버튼이 퍼블리싱 그대로 한 칸을 차지한다 */
.member-util .logout-form { display: flex; align-items: center; }
.mobile-menu__member .logout-form { display: contents; }

/* ---------- 봇 함정 칸 (문의하기 · 회원가입) — 사람에게는 보이지 않는다 ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- 서버가 돌려준 안내 문구 (퍼블리싱 .form-msg 를 폼 단위로 쓸 때의 자리) ---------- */
.form-msg--form { margin-top: 16px; }               /* 버튼 위 · 아래 */
.form-msg--top { margin: 0 0 16px; }                /* 폼 맨 위 */
.form-msg--center { text-align: center; }           /* 마이페이지: "저장되었습니다" 자리와 같게 가운데 */

/* ---------- 새 비밀번호 설정 (/member/reset) — 아이디·비밀번호 찾기 화면의 틀을 탭 없이 쓴다 ---------- */
.find-panel--solo { margin-top: 0; }
.find-panel--solo > .result-box:first-child { margin-top: 0; }

/* ---------- 협회소식 목록: 썸네일이 없는 글은 협회 로고를 가운데에 ---------- */
.news-list__thumb--noimage { display: grid; place-items: center; }
.news-list__thumb--noimage img { width: 106px; height: auto; object-fit: contain; }
.news-list__item a:hover .news-list__thumb--noimage img { transform: none; }

/* ---------- 관리자가 쓴 본문 (class="rte" — 게시판 상세 .view-body, 팝업 .popup-content) ----------
   관리자 에디터(SunEditor)가 만드는 HTML 을 사이트 글꼴 그대로 그린다. 에디터의 contents CSS 는 쓰지 않는다.
   사이트 초기화 CSS 가 모양을 없앤 것(목록 · 인용 · 제목 · 링크 · 표)과 에디터가 만든 구조(.se-component, figure > table)만 되살린다.
   퍼블리싱의 .view-figure(본문 사진) 는 sub.css 규칙 그대로 쓴다 */
.rte { overflow-wrap: anywhere; }
.rte::after { content: ""; display: block; clear: both; }
.rte a[href] { color: var(--point); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.rte ul, .rte ol { margin: 12px 0; padding-left: 1.6em; }
.rte ul { list-style: disc; }
.rte ol { list-style: decimal; }
.rte ul ul { list-style: circle; }
.rte ul ul, .rte ol ol, .rte ul ol, .rte ol ul { margin: 4px 0; }
.rte h1, .rte h2, .rte h3, .rte h4, .rte h5, .rte h6 { margin: 1.2em 0 .5em; font-weight: 700; line-height: 1.4; }
.rte h1 { font-size: 1.6em; }
.rte h2 { font-size: 1.4em; }
.rte h3 { font-size: 1.2em; }
.rte h4, .rte h5, .rte h6 { font-size: 1.05em; }
.rte blockquote { margin: 16px 0; padding: 10px 18px; border-left: 4px solid #d6d9de; color: var(--text); }
.rte pre { margin: 16px 0; padding: 12px 14px; border: 1px solid #dbdee3; border-radius: 6px; background: #f6f7f9; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.rte hr { margin: 24px 0; border: 0; border-top: 1px solid #d6d9de; }
.rte hr.__se__dotted { border-top-style: dotted; }
.rte hr.__se__dashed { border-top-style: dashed; }
/* 사진 · 영상 (에디터가 .se-component > figure 로 감싼다). 크기는 에디터가 style="width: 50%" 처럼 적어 둔다 */
.rte .se-component { max-width: 100%; margin: 16px 0; }
.rte .se-component figure { position: relative; display: block; margin: 0; max-width: 100%; }
.rte .se-component img { display: block; max-width: 100%; height: auto; }
.rte .__se__float-left { float: left; margin: 4px 20px 8px 0; }
.rte .__se__float-right { float: right; margin: 4px 0 8px 20px; }
.rte .__se__float-center { margin-left: auto; margin-right: auto; }
.rte .__se__float-center figure, .rte .__se__float-center img { margin-left: auto; margin-right: auto; }
.rte figure figcaption { padding: 8px 10px; background: #f6f7f9; color: var(--text); font-size: 14px; line-height: 1.6; text-align: center; }
.rte .se-video-container iframe, .rte .se-video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
/* 에디터로 만든 표 (figure > table) */
.rte figure > table { max-width: 100%; border-collapse: collapse; }
.rte figure > table:not([width]) { width: 100%; }
.rte figure > table td, .rte figure > table th { padding: 8px 10px; border: 1px solid #d6d9de; vertical-align: middle; }
.rte figure > table th { background: #f6f7f9; font-weight: 700; }
.rte figure.se-scroll-figure-x { overflow-x: auto; }
/* 팝업 안에서는 간격을 좁게 */
.popup-content.rte .se-component { margin: 10px 0; }

/* ---------- 메인 팝업 (관리자 '팝업 관리') — 고정 헤더(z-index 100) 위, 인트로(300) 아래 ---------- */
.popup-layer { position: absolute; z-index: 150; background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); overflow: hidden; max-width: calc(100vw - 32px); }
.popup-layer.hide { display: none; }
.popup-body img { display: block; width: 100%; height: auto; }
.popup-body a { display: block; color: inherit; text-decoration: none; }
.popup-content { padding: 18px 20px; font-size: 15px; line-height: 1.65; }
.popup-content img { max-width: 100%; }
.popup-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #1f2430; color: #fff; font-size: 13px; }
.popup-foot label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.popup-foot button { background: none; border: 0; color: #fff; font-size: 13px; cursor: pointer; padding: 4px 6px; }
@media (max-width: 768px) {
  .popup-layer { position: fixed; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: min(92vw, 420px) !important; }
}
