/*
 * SAFFY Print Styles
 * ===================
 * IMPORTANT: This file is synced with /org/css/print.css
 * Any changes must be applied to BOTH locations
 *
 * This file contains all print-related CSS for the 9 document types:
 * - doc_type01: 작업허가서 (Work Permit)
 * - doc_type02: 중장비 인양 계획서 (Heavy Equipment Lifting Plan)
 * - doc_type03: 야간/조출/주말 작업허가서 (Night/Early/Weekend Work Permit)
 * - doc_type04: 밀폐공간 작업허가서 (Confined Space Work Permit)
 * - doc_type05: 위험성 평가표 (Risk Assessment Table)
 * - doc_type06: 건설기계 작업 계획서 (Construction Equipment Work Plan)
 * - doc_type07: 고소작업차 작업 계획서 (Aerial Work Platform Plan)
 * - doc_type08: 전기 작업 허가서 (Electrical Work Permit)
 * - doc_type09: 화기 작업 허가서 (Hot Work Permit)
 */

@charset "utf-8";

/*─────────────────────────────────────────────────
								print_doc_wrap
─────────────────────────────────────────────────*/

.layer-popup .btn_print {
  font-size: 14px;
  height: 33px;
  padding: 0 12px;
  background: var(--mainColor);
  color: #fff;
  border-radius: 11px;
  position: absolute;
  top: -40px;
  right: 0px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.layer-popup .btn_print:before {
  content: "\e954";
  font-family: "saffy";
  font-size: 17px;
  font-weight: normal;
}

.print_doc_wrap {
  font-family: "Noto Sans KR", sans-serif !important;
  padding: 2cm 1cm;
  height: 297mm;
  box-sizing: border-box;
}
.print_doc_wrap table {
  width: 100%;
  font-size: 13px;
}
.print_doc_wrap h1 {
  font-size: 20pt;
  font-weight: 600;
  text-align: center;
  line-height: 1.75em;
  font-family: "맑은 고딕", "Malgun Gothic", "Noto Sans KR", sans-serif !important;
}
.print_doc_wrap h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.75em;
}

.print_doc_wrap .tbl_wrap {
  text-align: center;
  font-size: 12pt;
}
.print_doc_wrap .tbl_wrap table {
  width: 100%;
}
.print_doc_wrap .tbl_wrap table th,
.print_doc_wrap .tbl_wrap table td {
  padding: 0.4em 0.19cm;
  height: 2.9em;
  border: 1px solid #3f3f3f;
  word-break: keep-all;
  line-height: 1.2em;
}
.print_doc_wrap .tbl_wrap table th {
  font-size: 10pt;
  font-weight: bold;
}
.print_doc_wrap .tbl_wrap table td {
  font-size: 8pt;
  letter-spacing: -0.02em;
}
.print_doc_wrap .tbl_wrap table .th3 th {
  height: 3em !important;
}
.print_doc_wrap .tbl_wrap table.td4 td {
  height: 4.3em;
}
.print_doc_wrap .tbl_wrap table.td5 td {
  height: 5.3em;
}

.print_doc_wrap .tbl_summary {
  text-align: left;
  font-size: 8pt;
  font-weight: 600;
  margin-top: 0.8em;
  line-height: 1.6em;
}

.print_doc_wrap .tmp_div_table {
}
.print_doc_wrap .tmp_div_table li {
  display: flex;
  align-items: center;
  height: 1.75em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.print_doc_wrap .tmp_div_table li:not(:first-child) {
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}
.print_doc_wrap .tmp_div_table li span {
  display: inline-flex;
  align-items: center;
  padding: 0 0.7em;
  height: 100%;
  white-space: nowrap;
}
.print_doc_wrap .tmp_div_table li span:not(:first-child) {
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.print_doc_wrap .img_box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.print_doc_wrap#doc_type02 {
  padding: 0.7cm 1cm;
  font-size: 5.5pt;
}
.print_doc_wrap#doc_type02 .tbl_wrap {
  margin-top: 0;
}
.print_doc_wrap#doc_type02 .tbl_wrap table th,
.print_doc_wrap#doc_type02 .tbl_wrap table td {
  padding: 0.1em 0.19cm;
  line-height: 1.2em;
  vertical-align: middle;
}
.print_doc_wrap#doc_type02 .tbl_wrap table th {
  height: 2em;
  font-size: 6.5pt;
  background: #e9e9e9 !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.print_doc_wrap#doc_type02 .tbl_wrap table td {
  font-size: 6pt;
}
.print_doc_wrap#doc_type02 .img_box {
  overflow: hidden;
}
.print_doc_wrap#doc_type02 .img_box img {
  max-width: 100%;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.print_doc_wrap#doc_type03 {
  padding: 1cm 1cm;
  font-size: 9pt;
}
.print_doc_wrap#doc_type03 h1 {
  margin-bottom: 7pt;
}
.print_doc_wrap#doc_type03 h1 span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.print_doc_wrap#doc_type03 h1 span.check:before {
  content: "";
  position: absolute;
  display: inline-flex;
  width: 2.3em;
  height: 2.3em;
  border: 3px solid #3f3f3f;
  border-radius: 50%;
}
.print_doc_wrap#doc_type03 .tbl_wrap.auto {
  display: flex;
}
.print_doc_wrap#doc_type03 .tbl_wrap.auto table {
  width: auto !important;
}
.print_doc_wrap#doc_type03 .tbl_wrap table th,
.print_doc_wrap#doc_type03 .tbl_wrap table td {
  padding: 0.1em 0.19cm;
  line-height: 1.5em;
}
.print_doc_wrap#doc_type03 .tbl_wrap table th {
  height: 2.5em;
}
.print_doc_wrap#doc_type03 .tbl_wrap table td {
  font-size: 9pt;
  letter-spacing: -0.02em;
}

/* Signature Image Containers - Fixed typo from .img-hegiht* to .img-height* */
.img-height45-fix {
  height: 45px;
  vertical-align: middle;
  text-align: center;
}

.img-height45-fix img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Remove bullet points if list items are used */
.img-height45-fix ul,
.img-height45-fix li {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Table cell styling for print forms */
.print_doc_wrap .tbl_wrap table td.p_data_area {
  text-align: center;
  vertical-align: middle;
}

/* Image handling in print forms */
.print_doc_wrap .p_data_area img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  margin: 2px auto;
}

/* Enhanced print form styling */
.print_doc_wrap .tbl_wrap table th.p_data_area {
  background-color: #f0f0f0;
}

.print_doc_wrap .tbl_wrap table td.p_data_area {
  padding: 4px;
}

.print_doc_wrap .img-height45-fix.p_data_area {
  height: 45px;
}

.print_doc_wrap .img-height45-fix.p_data_area img {
  max-height: 40px;
  width: auto;
}

/* Remove borders from signature images in approval cells */
td.p_approverInfo01.img-height45-fix.p_data_area img,
td.p_approverInfo02.img-height45-fix.p_data_area img,
td.p_approverInfo03.img-height45-fix.p_data_area img,
td.p_approverInfo04.img-height45-fix.p_data_area img,
td.p_approverInfo05.img-height45-fix.p_data_area img,
td.p_approverInfo06.img-height45-fix.p_data_area img {
  border: none !important;
}

.print_doc_wrap .p_data_area br {
  line-height: 1.5em;
}

.print_doc_wrap .tbl_wrap table td.p_data_area.tleft {
  text-align: left;
}

.print_doc_wrap .tbl_wrap table td.p_data_area.tcenter {
  text-align: center;
}

.print_doc_wrap .p_risks.p_data_area td {
  padding: 0.3em 0.15cm;
  font-size: 7.5pt;
}

.print_doc_wrap .p_risks th {
  padding: 0.3em 0.15cm;
  font-size: 8pt;
}

.print_doc_wrap .p_details.p_data_area td {
  font-size: 7.5pt;
}

/* Fixed typo: .img-hegiht32-fix → .img-height32-fix */
.img-height32-fix {
  height: 32px;
  text-align: center;
}

.img-height32-fix img {
  max-height: 100%;
}

/* Fixed typo: .img-hegiht27-fix → .img-height27-fix */
.img-height27-fix {
  height: 27px;
}

.img-height27-fix img {
  max-height: 100%;
}

/*───────────────────────────────────────
			Print Popup (Layer Popup)
───────────────────────────────────────*/

/* General Layer Popup Styles */
@media print {
  /* Hide print button when actually printing */
  .layer-popup .btn_print,
  .layer-popup .pop-closer,
  .popCover {
    display: none !important;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print_doc_wrap {
    font-family: "Noto Sans KR", sans-serif !important;
    padding: 2cm 1cm;
    height: 297mm;
    box-sizing: border-box;
  }

  .print_doc_wrap table {
    width: 100%;
    font-size: 13px;
  }
  .print_doc_wrap h1 {
    font-size: 20pt;
    font-weight: 600;
    text-align: center;
    line-height: 1.75em;
    font-family: "맑은 고딕", "Malgun Gothic", "Noto Sans KR", sans-serif !important;
  }
  .print_doc_wrap h2 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.75em;
  }

  .print_doc_wrap .tbl_wrap {
    text-align: center;
    font-size: 12pt;
  }
  .print_doc_wrap .tbl_wrap table {
    width: 100%;
  }
  .print_doc_wrap .tbl_wrap table th,
  .print_doc_wrap .tbl_wrap table td {
    padding: 0.4em 0.19cm;
    height: 2.9em;
    border: 1px solid #3f3f3f;
    word-break: keep-all;
    line-height: 1.2em;
  }
  .print_doc_wrap .tbl_wrap table th {
    font-size: 10pt;
    font-weight: bold;
  }
  .print_doc_wrap .tbl_wrap table td {
    font-size: 8pt;
    letter-spacing: -0.02em;
  }
  .print_doc_wrap .tbl_wrap table .th3 th {
    height: 3em !important;
  }
  .print_doc_wrap .tbl_wrap table.td4 td {
    height: 4.3em;
  }
  .print_doc_wrap .tbl_wrap table.td5 td {
    height: 5.3em;
  }

  .print_doc_wrap .tbl_summary {
    text-align: left;
    font-size: 8pt;
    font-weight: 600;
    margin-top: 0.8em;
    line-height: 1.6em;
  }

  .print_doc_wrap .tmp_div_table li {
    display: flex;
    align-items: center;
    height: 1.75em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  .print_doc_wrap .tmp_div_table li:not(:first-child) {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }
  .print_doc_wrap .tmp_div_table li span {
    display: inline-flex;
    align-items: center;
    padding: 0 0.7em;
    height: 100%;
    white-space: nowrap;
  }
  .print_doc_wrap .tmp_div_table li span:not(:first-child) {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
  }

  .print_doc_wrap .img_box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .print_doc_wrap#doc_type02 {
    padding: 1cm 1cm;
    font-size: 6pt;
  }
  .print_doc_wrap#doc_type02 .tbl_wrap {
    margin-top: 0;
  }
  .print_doc_wrap#doc_type02 .tbl_wrap table th,
  .print_doc_wrap#doc_type02 .tbl_wrap table td {
    padding: 0.1em 0.19cm;
    line-height: 1.5em;
  }
  .print_doc_wrap#doc_type02 .tbl_wrap table th {
    height: 2.5em;
    font-size: 7pt;
    background: #e9e9e9 !important;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
  .print_doc_wrap#doc_type02 .tbl_wrap table td {
    font-size: 6.7pt;
  }

  .print_doc_wrap#doc_type03 {
    padding: 1cm 1cm;
    font-size: 9pt;
  }
  .print_doc_wrap#doc_type03 h1 {
    margin-bottom: 7pt;
  }
  .print_doc_wrap#doc_type03 h1 span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .print_doc_wrap#doc_type03 h1 span.check:before {
    content: "";
    position: absolute;
    display: inline-flex;
    width: 2.3em;
    height: 2.3em;
    border: 3px solid #3f3f3f;
    border-radius: 50%;
  }
  .print_doc_wrap#doc_type03 .tbl_wrap.auto {
    display: flex;
  }
  .print_doc_wrap#doc_type03 .tbl_wrap.auto table {
    width: auto !important;
  }
  .print_doc_wrap#doc_type03 .tbl_wrap table th,
  .print_doc_wrap#doc_type03 .tbl_wrap table td {
    padding: 0.1em 0.19cm;
    line-height: 1.5em;
  }
  .print_doc_wrap#doc_type03 .tbl_wrap table th {
    height: 2.5em;
  }
  .print_doc_wrap#doc_type03 .tbl_wrap table td {
    font-size: 9pt;
    letter-spacing: -0.02em;
  }
}

/* .print_doc_wrap#doc_type04 .tbl_wrap table td {font-size:9pt;} */

/*─────────────────────────────────────────────────
								240102 - 추가
─────────────────────────────────────────────────*/
.print_doc_wrap#doc_type05 {
  padding: 1cm;
  width: 297mm;
  height: 210mm;
}
.print_doc_wrap#doc_type05 .tbl_wrap table th,
.print_doc_wrap#doc_type05 .tbl_wrap table td {
  height: 2.6em;
  padding: 0.2em 0.15cm;
  font-size: 9pt;
}
.print_doc_wrap#doc_type05 .tbl_wrap table th {
  font-size: 10pt;
}
.print_doc_wrap#doc_type05 .tbl_wrap table td {
  font-size: 9pt;
}

@media print {
  .print_doc_wrap#doc_type05 {
    padding: 1cm;
    width: 297mm;
    height: 210mm;
  }
  .print_doc_wrap#doc_type05 .tbl_wrap table th,
  .print_doc_wrap#doc_type05 .tbl_wrap table td {
    height: 2.6em;
    padding: 0.2em 0.15cm;
    font-size: 9pt;
  }
  .print_doc_wrap#doc_type05 .tbl_wrap table th {
    font-size: 10pt;
  }
  .print_doc_wrap#doc_type05 .tbl_wrap table td {
    font-size: 9pt;
  }
}

/*─────────────────────────────────────────────────
								240112 - 추가 (doc_type07)
─────────────────────────────────────────────────*/
.print_doc_wrap#doc_type07 {
  padding: 0.8cm;
  font-size: 8pt;
}
.print_doc_wrap#doc_type07 h1 {
  font-size: 20pt;
  margin-bottom: 1.3em;
}
.print_doc_wrap#doc_type07 h2 {
  font-size: 9pt;
}
.print_doc_wrap#doc_type07 .tbl_wrap table th {
  height: 2em;
  padding: 0.2em 0.19em;
  font-size: 9pt;
}
.print_doc_wrap#doc_type07 .tbl_wrap table td {
  height: 2em;
  padding: 0.05em 0.19em;
  font-size: 8pt;
}
.print_doc_wrap#doc_type07 .tbl_wrap.type02 table td {
  height: 4em;
}

@media print {
  .print_doc_wrap#doc_type07 {
    padding: 0.8cm;
    font-size: 8pt;
  }
  .print_doc_wrap#doc_type07 h1 {
    font-size: 20pt;
    margin-bottom: 1.3em;
  }
  .print_doc_wrap#doc_type07 h2 {
    font-size: 9pt;
  }
  .print_doc_wrap#doc_type07 .tbl_wrap table th {
    height: 2em;
    padding: 0.2em 0.19em;
    font-size: 9pt;
  }
  .print_doc_wrap#doc_type07 .tbl_wrap table td {
    height: 2em;
    padding: 0.05em 0.19em;
    font-size: 8pt;
  }
  .print_doc_wrap#doc_type07 .tbl_wrap.type02 table td {
    height: 4em;
  }
}

/*─────────────────────────────────────────────────
								240418 - 추가
─────────────────────────────────────────────────*/
.print_doc_wrap#doc_type09 {
  padding: 1cm 1cm;
  font-size: 9pt;
}
.print_doc_wrap#doc_type09 h1 {
  margin-bottom: 7pt;
}
.print_doc_wrap#doc_type09 h1 span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.print_doc_wrap#doc_type09 h1 span.check:before {
  content: "";
  position: absolute;
  display: inline-flex;
  width: 2.3em;
  height: 2.3em;
  border: 3px solid #3f3f3f;
  border-radius: 50%;
}
.print_doc_wrap#doc_type09 .tbl_wrap.auto {
  display: flex;
}
.print_doc_wrap#doc_type09 .tbl_wrap.auto table {
  width: auto !important;
}
.print_doc_wrap#doc_type09 .tbl_wrap table th,
.print_doc_wrap#doc_type09 .tbl_wrap table td {
  padding: 0.1em 0.19cm;
  line-height: 1.5em;
}
.print_doc_wrap#doc_type09 .tbl_wrap table th {
  height: 2.5em;
}
.print_doc_wrap#doc_type09 .tbl_wrap table td {
  font-size: 9pt;
  letter-spacing: -0.02em;
}

@media print {
  .print_doc_wrap#doc_type09 {
    padding: 1cm 1cm;
    font-size: 9pt;
  }
  .print_doc_wrap#doc_type09 h1 {
    margin-bottom: 7pt;
  }
  .print_doc_wrap#doc_type09 h1 span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .print_doc_wrap#doc_type09 h1 span.check:before {
    content: "";
    position: absolute;
    display: inline-flex;
    width: 2.3em;
    height: 2.3em;
    border: 3px solid #3f3f3f;
    border-radius: 50%;
  }
  .print_doc_wrap#doc_type09 .tbl_wrap.auto {
    display: flex;
  }
  .print_doc_wrap#doc_type09 .tbl_wrap.auto table {
    width: auto !important;
  }
  .print_doc_wrap#doc_type09 .tbl_wrap table th,
  .print_doc_wrap#doc_type09 .tbl_wrap table td {
    padding: 0.1em 0.19cm;
    line-height: 1.5em;
  }
  .print_doc_wrap#doc_type09 .tbl_wrap table th {
    height: 2.5em;
  }
  .print_doc_wrap#doc_type09 .tbl_wrap table td {
    font-size: 9pt;
    letter-spacing: -0.02em;
  }
}

@media print {

  body:has(.print_doc_wrap#doc_type06) {
    page: doc06;
    margin: 3mm !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
    background: white !important;
  }

  @page doc06 {
    size: A4 portrait;
    margin: 3mm !important;
  }

  .print_doc_wrap#doc_type06 {
    width: 100% !important;
    max-width: 204mm !important;
    height: auto !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    padding: 2mm 3mm !important;
    font-size: 7.5pt !important;
    line-height: 1.05 !important;
    transform: none !important;
    zoom: 1 !important;
    box-sizing: border-box !important;
  }

  .print_doc_wrap#doc_type06 table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
    margin-bottom: 4px !important;
  }

  .print_doc_wrap#doc_type06 th,
  .print_doc_wrap#doc_type06 td {
    padding: 1.5px 2.5px !important;
    vertical-align: top !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    font-size: 7pt !important;
    line-height: 1.05 !important;
    border: 1px solid #3f3f3f !important;
  }

  .print_doc_wrap#doc_type06 th {
    font-weight: bold !important;
    text-align: center !important;
    background-color: #e9e9e9 !important;
    font-size: 7.5pt !important;
  }

  .print_doc_wrap#doc_type06 .small_row th,
  .print_doc_wrap#doc_type06 .small_row td {
    padding: 1px 2px !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.05 !important;
  }

  .print_doc_wrap#doc_type06 .tleft {
    text-align: left !important;
    padding-left: 3px !important;
  }

  .print_doc_wrap#doc_type06 .tright {
    text-align: right !important;
    padding-right: 3px !important;
  }

  .print_doc_wrap#doc_type06 .bold {
    font-weight: bold !important;
  }

  .print_doc_wrap#doc_type06 .p_data_area {
    text-align: left !important;
    vertical-align: top !important;
    font-size: 6.8pt !important;
    line-height: 1.05 !important;
  }

  .print_doc_wrap#doc_type06 .doc_document_name {
    font-size: 10pt !important;
    font-weight: bold !important;
    margin-bottom: 0 !important;
  }

  .print_doc_wrap#doc_type06 .img_box {
    width: 100% !important;
    height: auto !important;
    min-height: 150px !important;
    max-height: 150px !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px 0 !important;
  }

  .print_doc_wrap#doc_type06 .img_box img {
    max-width: 100% !important;
    max-height: 150px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  .print_doc_wrap#doc_type06 .merged-page1 {
    height: auto !important;
    overflow: visible !important;
  }

  .print_doc_wrap#doc_type06 .no-break-section,
  .print_doc_wrap#doc_type06 .no-break-equipment,
  .print_doc_wrap#doc_type06 .no-break-heavy,
  .print_doc_wrap#doc_type06 .no-break-sling,
  .print_doc_wrap#doc_type06 .no-break-risks {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .print_doc_wrap#doc_type06 .no-break-risks table {
    page-break-inside: auto !important;
  }

  .print_doc_wrap#doc_type06 .no-break-risks tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  @page {
    size: A4 portrait;
    margin: 3mm;
  }

  /* Ensure proper page breaking for multi-page document (doc_type06) */
  body:has(.print_doc_wrap#doc_type06) {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* doc_type02: no @media print overrides — fit handled via inline style in docPrint() */
