/**
 * 💰 cost-calculator.css
 * 호스피스 vs 요양병원 간병비 비교 계산기 전용 스타일시트
 * design-tokens.css 변수 100% 준수 및 300줄 레고 블록 엄수
 */

/* 1. 계산기 전체 컨테이너 */
.cost-calculator-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 16px;
  animation: calc-fade-in 0.3s ease;
}
@keyframes calc-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 2. 상단 헤더 배너 */
.calc-header-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  border: none;
}
.calc-header-title {
  font-size: var(--font-size-lg, 18px);
  font-weight: 800;
  color: var(--sage-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-header-sub {
  font-size: var(--font-size-sm, 13px);
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.45;
}

/* 3. 연명의료결정법 입원 자격 검증 게이트 */
.calc-gate-card {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: none;
  transition: all 0.25s ease;
}
.calc-gate-card.warning-mode {
  background: #fffbeb;
  border: none;
}
.calc-gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.calc-gate-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.calc-gate-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: #475569;
}
.calc-gate-card.warning-mode .calc-gate-badge {
  background: #fef3c7;
  color: #b45309;
}
.calc-gate-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.calc-gate-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}
.calc-gate-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--sage-primary);
  margin-top: 1px;
  cursor: pointer;
}
.calc-gate-alert-box {
  background: #fef2f2;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: #991b1b;
  line-height: 1.45;
}

/* 4. 시뮬레이션 설정 컨트롤 카드 */
.calc-control-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  border: none;
}
.calc-control-group {
  margin-bottom: 16px;
}
.calc-control-group:last-child {
  margin-bottom: 0;
}
.calc-control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.calc-control-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}
.calc-control-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--sage-deep);
}
.calc-slider {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  outline: none;
  accent-color: var(--sage-primary);
  cursor: pointer;
}
.calc-slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 간병 형태 라디오 칩 */
.calc-chip-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.calc-chip-btn {
  border: none;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.calc-chip-btn.active {
  border: none;
  background: #2d6a4f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(45, 106, 79, 0.25);
}

/* 5. 1:1 비교 결과 카드 그리드 */
.calc-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.calc-result-card {
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  background: var(--bg-surface);
  border: none;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.calc-result-card.hospice {
  background: #f0fdf4;
  border: none;
}
.calc-result-card.nursing {
  background: #fafaf9;
  border: none;
}
.calc-card-badge {
  font-size: 10px;
  font-weight: 800;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  align-self: flex-start;
}
.calc-result-card.hospice .calc-card-badge {
  background: #dcfce7;
  color: #166534;
  border: none;
}
.calc-result-card.nursing .calc-card-badge {
  background: #f5f5f4;
  color: #57534e;
  border: 1px solid #e7e5e4;
}
.calc-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}
.calc-fee-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  flex: 1;
}
.calc-fee-row {
  display: flex;
  justify-content: space-between;
}
.calc-total-box {
  border-top: 1px dashed #cbd5e1;
  padding-top: 8px;
  margin-top: auto;
}
.calc-total-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.calc-total-amount {
  font-size: 17px;
  font-weight: 900;
  margin-top: 2px;
}
.calc-result-card.hospice .calc-total-amount {
  color: var(--sage-deep);
}
.calc-result-card.nursing .calc-total-amount {
  color: #b91c1c;
}

/* 6. 절감액 하이라이트 배너 */
.calc-savings-banner {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.2);
}
.calc-savings-sub {
  font-size: 12px;
  color: #b7e4c7;
  font-weight: 600;
}
.calc-savings-main {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin: 4px 0 2px;
  letter-spacing: -0.5px;
}
.calc-savings-highlight {
  color: #fef08a;
}
.calc-savings-rate {
  font-size: 11px;
  color: #d8f3dc;
}

/* 7. 하단 추천 액션 버튼 */
.calc-action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calc-btn-find-hosp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--sage-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}
.calc-btn-find-hosp:hover {
  background: var(--sage-dark);
}
.calc-btn-hotline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
