/* ===== 遅延損害金 計算ツール スタイル（loan-calculator-tool準拠） ===== */
#edc-root *, #edc-root *::before, #edc-root *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
#edc-root {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  color: #333;
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  overflow: hidden;
}

/* ===== ヘッダー ===== */
#edc-root .edc-header {
  background: linear-gradient(135deg, #1a6fc4 0%, #0d4f91 100%);
  color: #fff;
  padding: 20px 24px 16px;
}
#edc-root .edc-header h2 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
  line-height: 1.4;
}
#edc-root .edc-header p {
  font-size: 13px;
  opacity: .9;
  line-height: 1.5;
}

/* ===== フォーム ===== */
#edc-root .edc-form-area {
  padding: 22px 24px;
}
#edc-root .edc-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
#edc-root .edc-form-group > label {
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin-bottom: 8px;
}
#edc-root input[type="number"],
#edc-root input[type="date"] {
  padding: 11px 12px;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  background: #fff;
  color: #333;
}
#edc-root input[type="number"]:focus,
#edc-root input[type="date"]:focus {
  outline: none;
  border-color: #1a6fc4;
  box-shadow: 0 0 0 3px rgba(26,111,196,.12);
}

/* 利率ラジオ */
#edc-root .edc-rate-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#edc-root .edc-radio {
  display: block;
  cursor: pointer;
}
#edc-root .edc-radio input {
  position: absolute;
  opacity: 0;
}
#edc-root .edc-radio-box {
  display: block;
  border: 1.5px solid #dde3ea;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all .15s;
}
#edc-root .edc-radio-box strong {
  display: block;
  font-size: 16px;
  color: #1a6fc4;
}
#edc-root .edc-radio-box small {
  display: block;
  font-size: 12px;
  color: #777;
  margin-top: 2px;
}
#edc-root .edc-radio input:checked + .edc-radio-box {
  border-color: #1a6fc4;
  background: #f0f7ff;
  box-shadow: 0 0 0 3px rgba(26,111,196,.10);
}

/* 任意入力 */
#edc-root .edc-custom-rate {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
#edc-root .edc-custom-rate input {
  max-width: 140px;
}
#edc-root .edc-custom-rate span {
  font-size: 15px;
  color: #555;
}

/* 日付2列 */
#edc-root .edc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#edc-root .edc-note {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin-top: -4px;
}

/* ===== 計算ボタン ===== */
#edc-root .edc-calc-btn-wrap {
  padding: 0 24px 22px;
}
#edc-root .edc-calc-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1a6fc4 0%, #0d4f91 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity .15s;
}
#edc-root .edc-calc-btn:hover {
  opacity: .9;
}
#edc-root .edc-error {
  color: #d8333a;
  font-size: 13px;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

/* ===== 結果エリア ===== */
#edc-root .edc-result-area {
  padding: 0 24px 24px;
}
#edc-root .edc-result-main {
  background: linear-gradient(135deg, #fff5f5 0%, #ffecec 100%);
  border: 1.5px solid #f3c2c2;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
#edc-root .edc-result-label {
  display: block;
  font-size: 13px;
  color: #b03a3a;
  font-weight: bold;
  margin-bottom: 6px;
}
#edc-root .edc-result-value {
  display: block;
  font-size: 34px;
  font-weight: bold;
  color: #d8333a;
  line-height: 1.2;
}
#edc-root .edc-result-days {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: #d8333a;
  border-radius: 999px;
  padding: 3px 12px;
  margin-top: 10px;
}

/* 内訳 */
#edc-root .edc-result-detail {
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
#edc-root .edc-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f4;
}
#edc-root .edc-detail-item:last-child {
  border-bottom: none;
}
#edc-root .edc-detail-label {
  font-size: 13px;
  color: #666;
}
#edc-root .edc-detail-value {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}
#edc-root .edc-detail-total {
  background: #f0f7ff;
}
#edc-root .edc-detail-total .edc-detail-label {
  color: #0d4f91;
  font-weight: bold;
}
#edc-root .edc-detail-total .edc-detail-value {
  color: #0d4f91;
  font-size: 18px;
}

/* 警告 */
#edc-root .edc-result-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffbe6;
  border: 1px solid #f5e2a0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
#edc-root .edc-alert-icon {
  font-size: 20px;
  line-height: 1.4;
}
#edc-root .edc-result-alert p {
  font-size: 13px;
  color: #7a5c00;
  line-height: 1.6;
}
#edc-root .edc-result-alert strong {
  color: #d8333a;
}

/* CV導線スロット（現状は空・余白なし） */
#edc-root .edc-cta-slot:empty {
  display: none;
}
#edc-root .edc-cta-slot {
  margin-bottom: 16px;
}

/* 計算式 */
#edc-root .edc-result-formula {
  font-size: 12px;
  color: #888;
  background: #f8fafc;
  border-radius: 6px;
  padding: 10px 14px;
  line-height: 1.6;
  word-break: break-all;
  margin-bottom: 16px;
}
#edc-root .edc-result-formula span:first-child {
  font-weight: bold;
  color: #666;
}

/* やり直し */
#edc-root .edc-retry-wrap {
  text-align: center;
}
#edc-root .edc-retry-btn {
  background: #fff;
  border: 1.5px solid #1a6fc4;
  color: #1a6fc4;
  border-radius: 8px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all .15s;
}
#edc-root .edc-retry-btn:hover {
  background: #f0f7ff;
}

/* 免責 */
#edc-root .edc-disclaimer {
  background: #f8fafc;
  border-top: 1px solid #e8ecf0;
  padding: 14px 24px;
}
#edc-root .edc-disclaimer p {
  font-size: 11px;
  color: #999;
  line-height: 1.6;
}

/* ===== レスポンシブ ===== */
@media ( max-width: 520px ) {
  #edc-root .edc-result-value {
    font-size: 28px;
  }
  #edc-root .edc-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  #edc-root .edc-form-row .edc-form-group {
    margin-bottom: 18px;
  }
}
