/* ho1 — 계산기 위젯 공용 스타일
 *
 * 언어별 계산기 페이지가 같은 마크업을 공유합니다.
 * 문구는 각 페이지에서, 계산 로직은 loan-calc.js 에서 담당합니다.
 *
 * 주의: site.css 의 헤더·푸터와 함께 쓰이므로 body 를 직접 잡지 않고
 * .calc-body 로 한정합니다. (pg-body 와 충돌 방지)
 */

.calc-body {
  font-family: inherit;
  background: #f0f4f8;
  color: #2d3748;
}

/* ── 레이아웃 ── */
.calc-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 12px;
  box-sizing: border-box;
}

/* 한국어 대출·연봉 계산기와 같은 3단(좌 광고 · 본문 · 우 광고) */
.calc-shell {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 12px;
  gap: 20px;
  align-items: start;
  box-sizing: border-box;
}
.calc-ad-side {
  position: sticky;
  top: 20px;
}
.calc-ad-side .adsbygoogle {
  display: block;
  width: 160px;
  height: 600px;
}
.calc-ad-top {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  box-sizing: border-box;
}
.calc-ad-top .adsbygoogle {
  width: 728px;
  max-width: 100%;
  height: 90px;
}
@media (max-width: 900px) {
  .calc-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 12px;
    gap: 0;
  }
  .calc-ad-top {
    padding: 0;
    height: 60px !important;
    max-height: 60px !important;
    min-height: unset !important;
    overflow: hidden !important;
  }
  .calc-ad-top .adsbygoogle {
    height: 60px !important;
    max-height: 60px !important;
    width: 100% !important;
  }
}

/* ── 카드 ── */
.calc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.calc-header {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  padding: 28px 32px;
  color: #fff;
}
.calc-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.35;
}
.calc-header p {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.6;
}

/* ── 탭 ── */
.calc-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}
.calc-tab {
  flex: 1;
  padding: 14px 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  position: relative;
  line-height: 1.3;
}
.calc-tab:hover { color: #3b82f6; background: #eff6ff; }
.calc-tab.is-active { color: #3b82f6; background: #fff; }
.calc-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  border-radius: 2px 2px 0 0;
}

/* ── 입력 폼 ── */
.calc-form {
  padding: 28px 32px;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calc-field.is-full { grid-column: span 2; }
.calc-field label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}
.calc-input {
  position: relative;
  display: flex;
  align-items: center;
}
.calc-input input,
.calc-input select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.calc-input input { padding-right: 52px; }
.calc-input input::placeholder {
  color: #b0bec5;
  font-weight: 400;
}
.calc-input input:focus,
.calc-input select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: #fff;
}
.calc-unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calc-hint {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
}

.calc-desc {
  margin-top: 18px;
  padding: 12px 16px;
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #2563eb;
  line-height: 1.65;
}

.calc-submit {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: opacity 0.2s, transform 0.1s;
}
.calc-submit:hover { opacity: 0.92; }
.calc-submit:active { transform: scale(0.99); }

.calc-error {
  margin-top: 14px;
  padding: 11px 15px;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #b91c1c;
  line-height: 1.6;
  display: none;
}
.calc-error.is-visible { display: block; }

/* ── 결과 ── */
.calc-result {
  padding: 0 32px 32px;
  display: none;
}
.calc-result.is-visible { display: block; }

.calc-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.calc-sum-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
}
.calc-sum-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}
.calc-sum-value {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  word-break: break-all;
}
.calc-sum-card.is-highlight {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border-color: #bfdbfe;
}
.calc-sum-card.is-highlight .calc-sum-label { color: #6366f1; }
.calc-sum-card.is-highlight .calc-sum-value { color: #3b82f6; }
.calc-sum-card.is-accent {
  background: linear-gradient(135deg, #fdf4ff, #fce7f3);
  border-color: #f0abfc;
  grid-column: span 2;
}
.calc-sum-card.is-accent .calc-sum-label { color: #a855f7; }
.calc-sum-card.is-accent .calc-sum-value { color: #9333ea; }

/* ── 스케줄 표 ── */
.calc-table-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-table-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(#3b82f6, #6366f1);
  border-radius: 2px;
  flex-shrink: 0;
}
.calc-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.calc-table thead tr {
  background: #1e293b;
  color: #fff;
}
.calc-table th {
  padding: 12px 14px;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}
.calc-table th:first-child {
  text-align: center;
  width: 68px;
}
.calc-table tbody tr:nth-child(even) { background: #f8fafc; }
.calc-table tbody tr:hover { background: #eff6ff; }
.calc-table td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calc-table td:first-child {
  text-align: center;
  font-weight: 600;
  color: #64748b;
}
.calc-table tbody tr:last-child td { border-bottom: none; }

/* ── 하단 설명 ── */
.calc-info {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 12px 60px;
  box-sizing: border-box;
}
.calc-info-section { margin-bottom: 38px; }
.calc-info-section:last-child { margin-bottom: 0; }
.calc-info-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  line-height: 1.4;
}
.calc-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.calc-info-card {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.calc-info-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.calc-info-card h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: linear-gradient(#3b82f6, #6366f1);
  border-radius: 2px;
  flex-shrink: 0;
}
.calc-info-card p,
.calc-info-box p {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.8;
}
.calc-info-card p + p,
.calc-info-box p + p { margin-top: 10px; }
.calc-info-box {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.calc-info-box ul {
  margin: 10px 0 0 18px;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.85;
}

/* ── 반응형 ── */
@media (max-width: 700px) {
  .calc-layout { padding: 16px; }
  .calc-header { padding: 22px 20px; }
  .calc-header h1 { font-size: 19px; }
  .calc-form { padding: 20px; }
  .calc-result { padding: 0 20px 24px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-field.is-full { grid-column: span 1; }
  .calc-summary { grid-template-columns: 1fr; }
  .calc-sum-card.is-accent { grid-column: span 1; }
  .calc-tab { font-size: 12px; padding: 12px 3px; }
  .calc-info { padding: 26px 16px 46px; }
  .calc-info-grid { grid-template-columns: 1fr; }
  .calc-info-section h2 { font-size: 17px; }
}
