/* ============================================================
   깨알도구
   시급 계산기 전용 CSS

   공통 디자인:
   ../../css/tool-common.css

   여기에는 시급 계산기에만 필요한 스타일만 둔다.
   ============================================================ */

/* ============================================================
   PAGE

   시급 계산기는 입력항목이 많아
   일반 도구보다 약간 넓게 사용한다.
   ============================================================ */

.tool-page {
  --tool-page-max-width: 940px;
}

/* ============================================================
   CALCULATOR

   입력영역을 결과영역보다 조금 넓게 사용한다.
   ============================================================ */

.wage-calculator {
  grid-template-columns:
    minmax(0, 1.08fr)
    minmax(0, 0.92fr);
}

/* ============================================================
   PERIOD

   하루 / 1주 / 한 달 / 직접입력
   ============================================================ */

.period-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.period-guide {
  margin-top: 8px;
}

/* ============================================================
   TIME ROW

   연장 / 야간 / 휴일근로 등의 전용 입력행
   ============================================================ */

.time-input-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    112px;

  align-items: center;

  gap: 12px;

  min-height: 52px;

  padding: 8px 0;

  border-bottom: 1px solid #efeee9;
}

.time-input-row:last-of-type {
  border-bottom: 0;
}

.time-input-info {
  min-width: 0;
}

.time-input-info strong {
  display: block;

  color: var(--text);

  font-size: 12px;

  font-weight: 800;
}

.time-input-info span {
  display: block;

  margin-top: 2px;

  color: var(--text-soft);

  font-size: 12px;
}

/* ============================================================
   SMALL TIME INPUT
   ============================================================ */

.small-input-wrap {
  position: relative;
}

.small-input-wrap input {
  width: 100%;

  height: 38px;

  padding: 0 38px 0 8px;

  border: 1px solid var(--line);

  border-radius: 9px;

  background: #ffffff;

  outline: none;

  color: var(--text);

  font-size: 12px;

  font-weight: 700;

  text-align: right;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.small-input-wrap input:focus {
  border-color: var(--accent);

  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.1);
}

.small-input-wrap span {
  position: absolute;

  right: 9px;

  top: 50%;

  transform: translateY(-50%);

  color: var(--text-soft);

  font-size: 12px;

  pointer-events: none;
}

/* ============================================================
   EXTRA HELP

   야간근로 입력 설명
   ============================================================ */

.extra-help {
  margin: 5px 0 8px;

  padding: 8px 10px;

  border-radius: 8px;

  background: var(--surface-soft);

  color: var(--text-soft);

  font-size: 12px;

  line-height: 1.55;
}

/* ============================================================
   RESULT PANEL

   시급 계산기는 결과 상세행이 많아
   최소 높이를 조금 더 확보한다.
   ============================================================ */

.wage-calculator .result-panel {
  min-height: 390px;
}

/* ============================================================
   RESULT CHECK

   입력한 실근로시간 요약
   ============================================================ */

.result-check {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-top: 12px;

  padding: 10px 12px;

  border-radius: 10px;

  background: var(--surface-soft);

  color: var(--text-soft);

  font-size: 12px;
}

.result-check strong {
  flex: 0 0 auto;

  color: var(--text);

  font-size: 12px;

  font-weight: 800;
}

/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 760px) {
  .wage-calculator {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 520px) {
  .period-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .period-button {
    min-height: 44px;
  }

  .time-input-row {
    grid-template-columns:
      minmax(0, 1fr)
      100px;

    gap: 8px;
  }
}
