/* ===========================================================
   화면 디자인 모드 (js/fpdesign.js, 2026-11-09 — 두언유통 css/dydesign.css 와 같게)
   =========================================================== */

/* 상단 우측 [🎨 디자인] 버튼 : admin + 디자인 모드를 쓰는 화면만 */
.dd-toggle{ height:26px; padding:0 10px; margin-right:0; border:1px solid #c98a2c; border-radius:6px; background:#fff7e8;
  color:#8a5a00; font-size:12.5px; font-weight:800; cursor:pointer; white-space:nowrap; }
.dd-toggle:hover{ background:#ffedc7; }
.dd-toggle.on{ background:#e67e22; border-color:#c0650f; color:#fff; }
.dd-toggle[hidden]{ display:none !important; }

/* 디자인 중인 항목 : 점선 · 선택 = 실선 · 숨긴 항목 = 흐리게 */
body.dd-on .dd-item{ outline:1px dashed #e67e22; outline-offset:-1px; cursor:move; }
body.dd-on .dd-item:hover{ outline:2px dashed #e67e22; background-color:rgba(230,126,34,.06); }
/* 구분선 (2026-11-16) : 2px 막대 · 가로줄이라 누르기 어려움 → 디자인 모드일 때만 둘레 6px 까지 눌림 · 점선은 바깥쪽 */
body.dd-on .dd-item:is(hr, [class$="-sep"], [class*="-sep "], [class$="-hr"], [class*="-hr "]){ position:relative; outline-offset:2px; }
body.dd-on .dd-item:is(hr, [class$="-sep"], [class*="-sep "], [class$="-hr"], [class*="-hr "])::before{ content:""; position:absolute; inset:-6px; }
body.dd-on .dd-sel{ outline:2px solid #d35400 !important; outline-offset:-2px; background-color:rgba(230,126,34,.12) !important; }
body.dd-on .dd-hidden{ opacity:.35; outline:1px dashed #c62828 !important; }
/* 여러 줄 입력칸 (2026-11-19, fpdesign.js mlOn) : 긴 글자 = 칸 폭에서 자동 줄바꿈 */
textarea.dd-ml{ resize:none; white-space:pre-wrap; overflow-wrap:anywhere; overflow-y:auto; line-height:1.35; font:inherit; box-sizing:border-box; }
textarea.dd-ml{ border:1px solid var(--line); border-radius:5px; padding:4px 7px; background:var(--panel); color:var(--ink); }
.ep-in textarea.dd-ml{ flex:1 1 0; min-width:0; font-size:var(--fs-grid); text-align:left; }
textarea.dd-ml[readonly], textarea.dd-ml:disabled{ background:var(--line2); color:var(--mute); }
body.dd-on .dd-item *{ cursor:move !important; }
body.dd-on .docs, body.dd-on .win, body.dd-on .modal{ user-select:none; }
/* 비활성화 칸(버튼 등)도 고를 수 있게 : 마우스를 통과시키고 fpdesign.js disabledAt 이 누른 자리로 찾는다 (2026-11-09) */
body.dd-on .dd-item:disabled, body.dd-on .dd-item :disabled{ pointer-events:none; }   /* 칸 안의 비활성 입력칸 · 콤보도 → 그 칸이 잡힘 */
.dd-br{ flex-basis:100% !important; width:100% !important; height:0 !important; margin:0 !important; padding:0 !important; border:0 !important; }

/* 크기조절 모서리 · 순서 표시선 */
.dd-handle{ position:fixed; z-index:9001; width:10px; height:10px; background:#d35400; border:1px solid #fff;
  box-shadow:0 0 0 1px #d35400; cursor:nwse-resize; }
.dd-handle[hidden], .dd-mark[hidden]{ display:none; }
.dd-mark{ position:fixed; z-index:9002; background:#1a56b8; border-radius:2px; pointer-events:none; }
.dd-mark.box{ background:rgba(26,86,184,.10); border:2px dashed #1a56b8; box-sizing:border-box; }   /* 다른 묶음 끝에 놓기 */
.dd-row code.dd-mv{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; background:#f4f4f4; padding:2px 4px; border-radius:3px; font-size:11.5px; }

/* 속성창 (팝업창 : 이동 가능 · 마지막 위치 기억) */
.dd-panel{ position:fixed; z-index:9000; top:90px; right:24px; width:300px; max-height:calc(100vh - 110px); display:flex; flex-direction:column;
  background:#fff; border:1px solid #c0650f; border-radius:8px; box-shadow:0 8px 28px rgba(0,0,0,.25); font-size:12.5px; color:#222; }
.dd-panel[hidden]{ display:none; }
.dd-h{ display:flex; align-items:center; gap:4px; padding:5px 8px; background:#e67e22; color:#fff; border-radius:7px 7px 0 0; cursor:move; user-select:none; }
.dd-h b{ font-size:13px; }
.dd-h .dd-scr{ flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.dd-x{ border:0; background:transparent; color:#fff; font-size:14px; cursor:pointer; padding:0 4px; }
.dd-info{ padding:6px 10px; border-bottom:1px solid #eee; line-height:1.5; }
.dd-info code{ background:#f4f4f4; padding:0 4px; border-radius:3px; font-size:11.5px; word-break:break-all; }
.dd-cnt{ color:#777; }
.dd-dirty{ color:#c62828; font-style:normal; font-weight:700; white-space:nowrap; }
.dd-props{ flex:1 1 auto; overflow:auto; overscroll-behavior:contain; padding:4px 10px; }
.dd-row{ display:flex; align-items:center; gap:6px; margin:3px 0; }
.dd-row > span{ flex:0 0 84px; text-align:right; font-weight:700; color:#2b4a74; }
.dd-row.set > span{ color:#d35400; }
.dd-row input[type=text], .dd-row input[type=number], .dd-row select{ flex:1 1 auto; min-width:0; height:24px; padding:0 6px;
  border:1px solid #bbb; border-radius:4px; font-size:12.5px; }
.dd-row input[type=number]{ max-width:90px; }
.dd-row em{ color:#888; font-style:normal; }
.dd-row input[type=color]{ width:44px; height:24px; padding:0 2px; border:1px solid #bbb; border-radius:4px; }
.dd-row input[type=color].dd-def{ opacity:.45; }
.dd-row input[type=checkbox]{ margin:0; width:16px; height:16px; accent-color:#e67e22; }
.dd-clr{ height:22px; padding:0 8px; border:1px solid #bbb; border-radius:4px; background:#f7f7f7; font-size:11.5px; cursor:pointer; }
.dd-tip{ padding:4px 10px; color:#777; font-size:11.5px; border-top:1px solid #eee; }
.dd-msg{ padding:0 10px; min-height:0; font-weight:700; }
.dd-msg.ok{ color:#1a7f37; padding:3px 10px; }
.dd-msg.ng{ color:#c62828; padding:3px 10px; }
.dd-foot{ display:flex; align-items:center; gap:4px; padding:6px 8px; border-top:1px solid #eee; }
.dd-foot .dd-sp{ flex:1 1 auto; }
.dd-foot button{ height:26px; padding:0 8px; border:1px solid #bbb; border-radius:5px; background:#f7f7f7; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.dd-foot button:disabled{ opacity:.45; cursor:default; }
.dd-foot button.primary{ background:#e67e22; border-color:#c0650f; color:#fff; padding:0 14px; }

/* 코드반영 창 */
.dd-modal{ position:fixed; inset:0; z-index:9100; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; }
.dd-modal-box{ width:min(640px, calc(100vw - 32px)); background:#fff; border-radius:8px; box-shadow:0 10px 30px rgba(0,0,0,.3); display:flex; flex-direction:column; }
.dd-modal-box .dd-h{ cursor:default; }
.dd-modal-box .dd-h b{ flex:1 1 auto; }
.dd-modal-box p{ margin:8px 12px 4px; font-size:12.5px; color:#444; }
.dd-modal-box textarea{ margin:4px 12px; height:320px; resize:vertical; font:12px/1.45 Consolas, monospace; border:1px solid #bbb; border-radius:4px; padding:6px; }

/* 팝업창 제목 줄 [🎨] (admin 만, 2026-11-09) : 누르면 그 팝업만 디자인 */
.dd-ptg{ margin-left:auto; margin-right:4px; height:22px; min-width:26px; padding:0 4px; border:1px solid #c98a2c; border-radius:5px;
  background:#fff7e8; font-size:13px; line-height:1; cursor:pointer; flex:0 0 auto; }
.dd-ptg:hover{ background:#ffedc7; }
.dd-ptg.on{ background:#e67e22; border-color:#c0650f; }
.dd-panel{ z-index:10100; }   /* 팝업(.win 60~75 · .modal 100 · 로그인 150) 위 */
.dd-handle{ z-index:10101; } .dd-mark{ z-index:10102; } .dd-modal{ z-index:10200; }
