.item-attachment-preview-button,
a.item-attachment-download { display:inline-flex !important; align-items:center; justify-content:center; vertical-align:middle; flex:0 0 auto; box-sizing:border-box; width:auto !important; height:34px !important; margin:0; padding:0 12px !important; border:1px solid #cbd5e1; border-radius:5px; background:#fff; color:#334155; font-family:inherit; font-size:12px !important; font-weight:600; line-height:1.4 !important; text-decoration:none; cursor:pointer; white-space:nowrap; }
.item-attachment-preview-button { border-color:#1d4ed8; background:#1d4ed8; color:#fff; }
.item-attachment-preview-button:hover { border-color:#1e40af; background:#1e40af; }
a.item-attachment-download:hover { border-color:#94a3b8; background:#f1f5f9; color:#1e293b; }
.item-attachment-preview-button:focus-visible,
a.item-attachment-download:focus-visible { outline:3px solid #93c5fd; outline-offset:2px; }
a.item-attachment-download.iap-download-icon::after { content:'다운로드'; margin-left:5px; }
.iap-file-row { display:flex !important; align-items:center; gap:8px; }
.iap-file-row > .attached_txt { flex:1; min-width:0; text-align:left; overflow-wrap:anywhere; }
.iap-file-row > .item-attachment-preview-button { margin-left:auto; }
.iap-file-row > a:empty { display:none; }
.iap-file-actions { white-space:nowrap; }
.iap-file-actions > .item-attachment-preview-button { margin-right:8px; }
td.iap-file-actions { width:180px; }
#file_tab .content_file_list_box:has(.iap-file-actions) { display:flex; align-items:center; gap:8px; }
#file_tab .content_file_list_box:has(.iap-file-actions) > .content_file_list_box_L { flex:1; min-width:0; width:auto; }
#file_tab .content_file_list_box > .iap-file-actions { flex:0 0 auto; width:auto; }
/* 스타일3 목록 상세 모달에서 첨부 메뉴가 버튼 영역에 잘리지 않도록 한다. */
#modal-item #zigbang_wrap .zigbang_mobile_footer > .btn_box,
#modal-item #zigbang_wrap .zigbang_mobile_footer .file_btn { overflow:visible !important; }
#modal-item #zigbang_wrap .zigbang_mobile_footer .file_btn .nav_drop { left:0; right:auto; min-width:180px; max-width:calc(100vw - 20px); }
#item-attachment-preview { position:fixed; top:0; right:0; bottom:0; width:46vw; z-index:10050; display:flex; flex-direction:column; background:#fff; border-left:1px solid #cbd5e1; box-shadow:-4px 0 18px #0002; color:#263445; text-align:left; font-size:14px; }
#item-attachment-preview[hidden] { display:none; }
#item-attachment-preview-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.45); }
#item-attachment-preview-backdrop[hidden] { display:none; }
#item-attachment-preview * { box-sizing:border-box; }
#item-attachment-preview .iap-header { display:flex; align-items:center; gap:10px; padding:12px; border-bottom:1px solid #dce1e7; background:#f8fafc; }
#item-attachment-preview .iap-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
#item-attachment-preview button, #item-attachment-preview .iap-download { padding:6px 9px; border:1px solid #cbd5e1; border-radius:4px; background:#fff; color:#334155; font-size:13px; line-height:1.4; cursor:pointer; white-space:nowrap; }
#item-attachment-preview .iap-header .iap-download, #item-attachment-preview .iap-header .iap-close { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; height:40px; padding:0 16px; border-radius:6px; color:#fff; font-size:14px; font-weight:700; text-decoration:none; }
#item-attachment-preview .iap-header .iap-download { border-color:#1d4ed8; background:#1d4ed8; }
#item-attachment-preview .iap-header .iap-download:hover { border-color:#1e40af; background:#1e40af; }
#item-attachment-preview .iap-header .iap-close { border-color:#334155; background:#334155; }
#item-attachment-preview .iap-header .iap-close:hover { border-color:#1e293b; background:#1e293b; }
#item-attachment-preview .iap-header .iap-download:focus-visible, #item-attachment-preview .iap-header .iap-close:focus-visible { outline:3px solid #93c5fd; outline-offset:2px; }
#item-attachment-preview .iap-tools { display:flex; align-items:center; gap:6px; padding:8px 12px; flex-wrap:wrap; border-bottom:1px solid #dce1e7; }
#item-attachment-preview .iap-tools[hidden] { display:none; }
#item-attachment-preview .iap-hint { margin:0; padding:12px 14px; border-left:4px solid #2563eb; border-bottom:1px solid #bfdbfe; background:#eff6ff; color:#1e3a5f; font-size:14px; font-weight:600; line-height:1.65; }
#item-attachment-preview .iap-content { flex:1; min-height:0; overflow:auto; background:#e8ecf1; }
#item-attachment-preview .iap-content iframe { display:block; width:100%; height:100%; border:0; background:#fff; }
#item-attachment-preview .iap-content img { display:block; max-width:none; height:auto; margin:12px auto; }
#item-attachment-preview .iap-status { padding:18px; color:#475467; line-height:1.7; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) { display:block !important; float:none !important; width:auto !important; min-width:0 !important; margin-right:46vw; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .container { max-width:100%; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .itemList .wrap_1200,
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .item_header .wrap_1200 { width:100% !important; min-width:0 !important; max-width:100% !important; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .itemList .item_left,
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .itemList .item_right { position:static !important; display:block !important; float:none !important; width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .iap-detail { width:100% !important; min-width:0 !important; max-width:100% !important; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .iap-detail .zigbang_content_wrap { flex-wrap:wrap !important; }
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .iap-detail .zigbang_content_wrap > div,
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .iap-detail > .item_left_wrap,
html.item-attachment-preview-open:not(.item-attachment-preview-modal) .iap-detail > .item_right_wrap { position:static !important; width:100% !important; max-width:100% !important; margin-left:0 !important; margin-right:0 !important; }
html.item-attachment-preview-modal,
html.item-attachment-preview-modal body { overflow:hidden; }
#item-attachment-preview.iap-modal { top:var(--iap-modal-top, 50%); left:var(--iap-modal-left, 50%); right:auto; bottom:auto; width:var(--iap-modal-width, 90vw); height:var(--iap-modal-height, 90vh); transform:translate(-50%,-50%); border:0; border-radius:8px; overflow:hidden; box-shadow:0 16px 48px #0005; box-sizing:border-box; }
@media(max-width:900px) {
    #item-attachment-preview.iap-modal { top:0; left:0; width:100%; height:100vh; height:100dvh; transform:none; border-radius:0; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
    html.item-attachment-preview-open:not(.item-attachment-preview-modal) { margin-right:0; padding-bottom:0; overflow:hidden; }
    html.item-attachment-preview-open:not(.item-attachment-preview-modal) body { overflow:hidden; }
    #item-attachment-preview .iap-header { padding:8px; }
}
@media print { #item-attachment-preview, #item-attachment-preview-backdrop, .item-attachment-preview-button { display:none !important; } html.item-attachment-preview-open:not(.item-attachment-preview-modal) { margin:0; padding:0; } }
