/* ---------------------------------------------------------------------------
 * IK0612P.xfdl 변환본 — 공통마스터조회 모달 (7 type 통합 = 재진입 모듈 실증).
 * Modal #A 11번째 인스턴스.
 * --------------------------------------------------------------------------- */

#ik-common-master-modal {
  display: none;
  position: fixed;
  inset: 0;
  /* 다른 모달(등록/수정 등 z-index:9000) 위에서 중첩 호출되는 선택 모달 → 더 높은 z-index 로 위에 표시. */
  z-index: 9500;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
}
#ik-common-master-modal.is-open { display: flex; }

#ik-common-master-modal .layer-wrap {
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#ik-common-master-modal .layer-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 2px solid #2c4368;
  background: #2c4368;
  color: #ffffff;
}
#ik-common-master-modal .layer-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
#ik-common-master-modal .layer-close {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}
#ik-common-master-modal .layer-content { padding: 12px 16px; position: relative; }
/* 조회 로딩 오버레이 + 스피너 (ik-corp-master 와 동일 패턴). */
#ik-common-master-modal .ik-common-master-loading {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px; font-weight: 600; color: #2c4368;
}
#ik-common-master-modal .ik-common-master-loading[hidden] { display: none; }
#ik-common-master-modal .ik-common-master-spinner {
  width: 36px; height: 36px;
  border: 4px solid #d0d4dc; border-top-color: #4f6b96; border-radius: 50%;
  animation: ik-common-master-spin 0.8s linear infinite;
}
@keyframes ik-common-master-spin { to { transform: rotate(360deg); } }
#ik-common-master-modal .search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
#ik-common-master-modal .search-label {
  width: 70px;
  font-size: 13px;
  color: #1f2a44;
}
#ik-common-master-modal .search-input {
  flex: 1;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cdd2dc;
  border-radius: 3px;
  font-size: 13px;
}
#ik-common-master-modal .btn-search {
  height: 28px;
  padding: 0 14px;
  border: 1px solid #2c4368;
  background: #2c4368;
  color: #ffffff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
#ik-common-master-modal .ik-common-master-grid {
  border: 1px solid #cdd2dc;
  border-radius: 3px;
  height: 260px;
  overflow: auto;
}
#ik-common-master-modal .ik-common-master-grid table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#ik-common-master-modal .ik-common-master-grid thead th {
  background: #fafbfc;
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid #cdd2dc;
  font-weight: 600;
}
#ik-common-master-modal .ik-common-master-grid td {
  padding: 4px 8px;
  border-bottom: 1px solid #eef0f3;
  text-align: center;
  cursor: pointer;
}
#ik-common-master-modal .ik-common-master-grid tr:hover td {
  background: #eef2f7;
}
#ik-common-master-modal .ik-common-master-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #6d7280;
  text-align: right;
}
