/*
 * 실수령액 계산기 공용 스타일 (hulam/take_home_calculator_form.php)
 * 레이아웃은 세전급여 계산기(/util/net-calculator/)와 같게 입력 영역 446px + 결과 영역 316px을 가운데 정렬한다.
 * 입력 컴포넌트 자체의 스타일은 휴램 디자인 시스템 컴포넌트와 공통 CSS를 그대로 사용한다.
 */
.take-home-calculator {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  color: #1a1818;
  font-size: 14px;
}

.take-home-calculator__form {
  display: flex;
  flex: 0 0 446px;
  flex-direction: column;
  gap: 40px;
  box-sizing: border-box;
  width: 446px;
  padding: 40px 40px 0;
}

/* '계산하기' 버튼은 세전급여 계산기처럼 스크롤 영역 하단에 고정한다. */
.take-home-calculator__submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 9;
  margin: 0 -40px;
  padding: 14px 40px;
  background: #fff;
}

.take-home-calculator__field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.take-home-calculator__label-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.take-home-calculator__label {
  color: #1a1818;
  font-size: 16px;
  font-weight: 600;
  line-height: 16px;
}

.take-home-calculator__row {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
}

.take-home-calculator__select {
  width: 216px;
}

/* 기준연월은 직접 입력을 막기 위해 readonly이지만, 선택 가능한 입력란이므로 흰색 배경으로 보여 준다. */
.take-home-calculator .date_picker .calendar_input_popup:read-only {
  background: #fff;
  cursor: pointer;
}

/* 공제 항목 계산 방식(자동계산/직접입력)과 금액 입력란 */
.take-home-calculator__deduction-type {
  flex: 0 0 120px;
  width: 120px;
}

.take-home-calculator__money {
  box-sizing: border-box;
  width: 120px;
}

/* 4대보험 미가입이면 계산 방식·금액 입력란을 숨긴다. (.take-home-calculator__row의 display보다 우선) */
.take-home-calculator [data-deduction][hidden] {
  display: none;
}

.take-home-calculator__insurances {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
}

.take-home-calculator__insurance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.take-home-calculator__insurance-label {
  font-weight: 600;
}

.take-home-calculator__error {
  margin: 0;
  color: #ff4e4e;
  font-size: 14px;
  line-height: 20px;
}

.take-home-calculator__result {
  display: flex;
  flex: 0 0 316px;
  flex-direction: column;
  gap: 48px;
  width: 316px;
  padding: 40px;
  background: #f7f8fc;
}

.take-home-calculator__result-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.take-home-calculator__result-title {
  margin: 0;
  color: #1a1818;
  font-size: 16px;
  font-weight: 600;
}

.take-home-calculator__result ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.take-home-calculator__result li {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f3f4f8;
}

.take-home-calculator__result-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6d717b;
}

.take-home-calculator__result-total .take-home-calculator__result-label,
.take-home-calculator__result-total [data-result] {
  color: #1a1818;
  font-weight: 600;
}

.take-home-calculator__result-highlight .take-home-calculator__result-label {
  color: #1a1818;
}

.take-home-calculator__result-highlight [data-result] {
  color: #407df1;
  font-weight: 600;
}

.take-home-calculator__actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 767px) {
  .take-home-calculator {
    flex-direction: column;
    align-items: stretch;
  }

  .take-home-calculator__form,
  .take-home-calculator__result {
    flex-basis: auto;
    box-sizing: border-box;
    width: 100%;
    padding: 24px 20px;
  }

  .take-home-calculator__form {
    padding-bottom: 0;
  }

  .take-home-calculator__submit-bar {
    margin: 0 -20px;
    padding: 14px 20px;
  }
}
