/*!
 * JJEditor — View stylesheet (GNUBoard)
 * File: /plugin/editor/jjeditor/assets/css/jjeditor.view.css
 * Scope: #bo_v_con
 * Purpose:
 *  - 에디터와 뷰가 1:1로 보이도록(특히 영상 임베드) — padding-top 16:9, overscan/shifty 변수 지원
 */

/* ───────── 베이스 타이포 ───────── */
#bo_v_con{font-family:'Pretendard','Noto Sans KR',system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Apple SD Gothic Neo','Malgun Gothic',sans-serif!important;font-size:16px;line-height:1.75;color:#111;-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;text-rendering:optimizeLegibility;font-kerning:normal;font-feature-settings:"kern"1,"liga"1,"clig"1,"calt"1;font-variation-settings:normal;font-synthesis-weight:auto}
#bo_v_con p,#bo_v_con li,#bo_v_con blockquote,#bo_v_con table,#bo_v_con pre,#bo_v_con code,#bo_v_con td,#bo_v_con th{font-size:inherit;line-height:inherit;font-family:inherit!important;color:inherit;font-weight:400;letter-spacing:normal}
#bo_v_con *{-webkit-font-smoothing:inherit!important;-moz-osx-font-smoothing:inherit!important}
#bo_v_con b,#bo_v_con strong{font-weight:700}
#bo_v_con h1{font-size:2em;line-height:1.25;margin:1.2em 0 .6em;font-weight:700}
#bo_v_con h2{font-size:1.75em;line-height:1.3;margin:1.1em 0 .55em;font-weight:700}
#bo_v_con h3{font-size:1.5em;line-height:1.35;margin:1em 0 .5em;font-weight:600}
#bo_v_con h4{font-size:1.25em;line-height:1.4;margin:.9em 0 .45em;font-weight:600}
#bo_v_con{text-shadow:none!important;filter:none!important;backface-visibility:visible;opacity:1}
#bo_v_con ul,#bo_v_con ol{margin:0 0 1em 1.25em}
#bo_v_con blockquote{margin:1em 0;padding:.75em 1em;border-left:4px solid #2563eb;background:#fafafa}
#bo_v_con pre{padding:.75em 1em;background:#f6f8fa;border-radius:6px;overflow:auto}
#bo_v_con table{border-collapse:collapse;width:100%}
#bo_v_con th,#bo_v_con td{border:1px solid #e5e5e5;padding:.6em .75em}
#bo_v_con a{color:#1f4ad7}#bo_v_con a:hover{text-decoration:underline}
#bo_v_con img{max-width:100%;height:auto}#bo_v_con img.jj-img{display:inline-block;vertical-align:middle}

/* 파일칩(생략 없이 유지) */
#bo_v_con{--jj-file-row:34px;--jj-file-ico-pad:6px}
#bo_v_con .jj-filechip{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:var(--jj-file-row);padding:4px 12px 4px calc(var(--jj-file-row) + 12px + (var(--jj-file-ico-pad) * 2));border:1px solid rgba(0,0,0,.18);border-radius:5px;background:#f8f9fb;color:#333;font-size:13px;line-height:1.25;vertical-align:baseline;outline:1px dashed transparent;min-width:260px;width:-moz-fit-content;width:fit-content;overflow:hidden;text-decoration:none!important;transition:background-color .15s ease,border-color .15s ease,outline-color .2s ease}
#bo_v_con .jj-filechip:hover{background:#eef1f5;border-color:rgba(0,0,0,.5)}
#bo_v_con .jj-filechip:focus-visible{outline-color:rgba(0,0,0,.28)}
#bo_v_con .jj-filechip.is-disabled{cursor:not-allowed;opacity:.6;pointer-events:none}
#bo_v_con .jj-filechip::before{content:"";position:absolute;left:1px;top:1px;bottom:1px;width:calc(var(--jj-file-row) - 2px + (var(--jj-file-ico-pad) * 2));background:#f0f2f5;border-right:1px solid rgba(0,0,0,.08);border-top-left-radius:4px;border-bottom-left-radius:4px}
#bo_v_con .jj-filechip .filechip{position:absolute;left:0;top:0;bottom:0;width:calc(var(--jj-file-row) + (var(--jj-file-ico-pad) * 2));display:flex;align-items:center;justify-content:center;pointer-events:none}
#bo_v_con .jj-filechip .filechip i{font-size:25px;color:#555;opacity:.85}
#bo_v_con .jj-filechip .txt{display:flex;flex-direction:column;gap:2px;min-width:0}
#bo_v_con .jj-filechip .line1{font-size:14px;font-weight:600;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bo_v_con .jj-filechip .line1 .name{font-weight:600}
#bo_v_con .jj-filechip .line1 .size{margin-left:.45em;font-size:12.5px;font-weight:500;color:#6b7280}
#bo_v_con .jj-filechip .line2{font-size:13px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bo_v_con .jj-filechip + .jj-filechip{margin-left:8px}
@media (max-width:480px){#bo_v_con .jj-filechip{white-space:normal}#bo_v_con .jj-filechip .line1,#bo_v_con .jj-filechip .line2{white-space:normal}}

/* ───────── 영상 임베드(뷰) — 에디터와 완전 동일 ───────── */
#bo_v_con .jj-embed{position:relative;display:block;width:100%;max-width:100%;margin:12px 0;background:#000;border-radius:8px;overflow:hidden;line-height:0}
#bo_v_con .jj-embed[data-wpx="500"]{width:500px;margin-left:auto;margin-right:auto}
#bo_v_con .jj-embed[data-wpx="382"]{width:382px;margin-left:auto;margin-right:auto}

/* padding-top 16:9 래퍼 + 변수: --jj-overscan(%) / --jj-shifty(%) */
#bo_v_con .jj-embed-inner{position:relative;width:100%;background:#000;border-radius:8px;overflow:hidden;line-height:0;--jj-overscan:0%;--jj-shifty:0%}
#bo_v_con .jj-embed-inner::before{content:"";display:block;padding-top:56.25%} /* 9/16 */
#bo_v_con .jj-embed-inner>iframe{position:absolute;left:0;right:0;top:calc((var(--jj-overscan)*-1) + var(--jj-shifty));width:100%!important;height:calc(100% + (var(--jj-overscan)*2))!important;display:block;border:0}

/* 래퍼가 없는 과거 글 대비용(기본 16:9) */
#bo_v_con iframe[src*="youtube.com"],
#bo_v_con iframe[src*="youtu.be"],
#bo_v_con iframe[src*="player.vimeo.com"],
#bo_v_con iframe[src*="vimeo.com"]{display:block;width:100%!important;max-width:100%;height:auto!important;aspect-ratio:16/9;border:0}

/* 감싸는 태그가 폭을 제한하는 경우 */
#bo_v_con p>.jj-embed,#bo_v_con figure>.jj-embed{width:100%;max-width:100%}

/* ───────── 링크 카드(요약) ───────── */
#bo_v_con .jj-link-card{display:block!important;width:100%!important;max-width:382px!important;margin:12px auto!important;box-sizing:border-box!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
#bo_v_con .jj-link-card[data-jj-card-size="small"],#bo_v_con .jj-link-card.is-small{max-width:382px!important;width:100%!important;margin-left:auto!important;margin-right:auto!important}
#bo_v_con .jj-link-card[data-jj-card-size="full"],#bo_v_con .jj-link-card.is-full{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important}
#bo_v_con .jj-link-card>a{display:flex!important;gap:10px!important;border:1px solid #e5e7eb!important;border-radius:10px!important;padding:8px!important;background:#fff!important;overflow:hidden!important;text-decoration:none!important;color:inherit!important}
#bo_v_con .jj-link-card .thumb{flex:0 0 120px!important;max-width:120px!important;height:80px!important;border-radius:8px!important;overflow:hidden!important;background:#f3f4f6!important;display:flex!important;align-items:center!important;justify-content:center!important}
#bo_v_con .jj-link-card .thumb img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center center!important;max-width:none!important;display:block!important}
#bo_v_con .jj-link-card .meta{min-width:0!important;display:flex!important;flex-direction:column!important;gap:6px!important;justify-content:center!important}
#bo_v_con .jj-link-card .t{font-weight:700!important;font-size:13px!important;line-height:1.35!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important;overflow:hidden!important;text-overflow:ellipsis!important}
#bo_v_con .jj-link-card .d{font-size:12px!important;color:#4b5563!important;line-height:1.35!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important}
#bo_v_con .jj-link-card .h{font-size:11px!important;color:#6b7280!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#bo_v_con .jj-link-card[data-jj-card-size="full"] .t,#bo_v_con .jj-link-card.is-full .t{-webkit-line-clamp:2!important}
#bo_v_con .jj-link-card[data-jj-card-size="full"] .d,#bo_v_con .jj-link-card.is-full .d{-webkit-line-clamp:4!important}
@media (max-width:480px){#bo_v_con .jj-link-card .thumb{flex-basis:96px!important;max-width:96px!important;height:64px!important}}

/* ───────── 세이프티 리셋(삭제 금지) ───────── */
#bo_v_con{white-space:normal!important}
#bo_v_con p{display:block!important;margin:1em 0!important}
#bo_v_con br{display:inline!important;content:normal!important}
#bo_v_con .jj-embed,#bo_v_con .jj-embed-inner{display:block!important;white-space:normal!important}
