/* ======== ICL見積もり＆ローン計算 ======== */
.icl-est {
  max-width: 640px;
  margin: 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: #1e293b;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
.icl-est *, .icl-est *::before, .icl-est *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- ヘッダー ---- */
.icl-est__header {
  text-align: center;
  margin-bottom: 24px;
}
.icl-est__title {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}
.icl-est__subtitle {
  font-size: 13px;
  color: #94a3b8;
}

/* ---- タブ ---- */
.icl-est__tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.icl-est__tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.icl-est__tab svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icl-est__tab.is-active {
  background: #fff;
  color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* ---- タブパネル ---- */
.icl-est__panel {
  display: none;
}
.icl-est__panel.is-active {
  display: block;
  animation: iclFadeIn 0.3s ease;
}
@keyframes iclFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- カード ---- */
.icl-est__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

/* ---- フォームグループ ---- */
.icl-est__group-title {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icl-est__group-title svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #6366f1;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icl-est__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.icl-est__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
}
.icl-est__field select,
.icl-est__field input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.icl-est__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.icl-est__field select:focus,
.icl-est__field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* 度数確認リンク */
.icl-est__help-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6366f1;
  cursor: pointer;
  margin-bottom: 16px;
  font-weight: 600;
  transition: opacity 0.2s;
  background: none;
  border: none;
  font-family: inherit;
}
.icl-est__help-link:hover { opacity: 0.7; }
.icl-est__help-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- ボタン ---- */
.icl-est__btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
}
.icl-est__btn--primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.icl-est__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.icl-est__btn--secondary {
  background: #f1f5f9;
  color: #6366f1;
}
.icl-est__btn--secondary:hover {
  background: #e2e8f0;
}

/* ---- 結果表示 ---- */
.icl-est__result {
  display: none;
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border: 2px solid #c4b5fd;
  border-radius: 16px;
  margin-top: 16px;
}
.icl-est__result.is-visible { display: block; animation: iclFadeIn 0.4s ease; }
.icl-est__result-label {
  font-size: 13px;
  color: #7c3aed;
  font-weight: 600;
  margin-bottom: 4px;
}
.icl-est__result-price {
  font-size: 36px;
  font-weight: 900;
  color: #6366f1;
  letter-spacing: -1px;
  line-height: 1.2;
}
.icl-est__result-price .unit {
  font-size: 16px;
  font-weight: 700;
  color: #7c3aed;
}
.icl-est__result-note {
  font-size: 11px;
  color: #a78bfa;
  margin-top: 8px;
  line-height: 1.6;
}

/* ---- 内訳テーブル ---- */
.icl-est__breakdown {
  display: none;
  margin-top: 16px;
}
.icl-est__breakdown.is-visible { display: block; }
.icl-est__breakdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.icl-est__breakdown th,
.icl-est__breakdown td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.icl-est__breakdown th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
  width: 40%;
}
.icl-est__breakdown td {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
}
.icl-est__breakdown tr:last-child th,
.icl-est__breakdown tr:last-child td {
  border-bottom: none;
  color: #6366f1;
  font-weight: 800;
  font-size: 14px;
}

/* ---- ローン計算結果 ---- */
.icl-est__loan-result {
  display: none;
  margin-top: 16px;
}
.icl-est__loan-result.is-visible { display: block; animation: iclFadeIn 0.4s ease; }
.icl-est__loan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.icl-est__loan-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.icl-est__loan-item--wide {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-color: #c4b5fd;
}
.icl-est__loan-item dt {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 4px;
}
.icl-est__loan-item dd {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
}
.icl-est__loan-item--wide dd {
  font-size: 24px;
  color: #6366f1;
}
.icl-est__loan-item dd .yen {
  font-size: 13px;
  font-weight: 600;
}

/* ---- 注釈 ---- */
.icl-est__note {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}

/* ---- モーダル ---- */
.icl-est__modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99998;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.icl-est__modal-overlay.is-open { display: flex; }
.icl-est__modal {
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px 24px;
  position: relative;
}
.icl-est__modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.2s;
  font-family: inherit;
}
.icl-est__modal-close:hover { background: #e2e8f0; }
.icl-est__modal h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}
.icl-est__modal p {
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.7;
}
.icl-est__modal strong {
  color: #6366f1;
}

/* ---- レスポンシブ ---- */
@media (max-width: 480px) {
  .icl-est__card { padding: 16px; }
  .icl-est__result-price { font-size: 30px; }
  .icl-est__loan-grid { grid-template-columns: 1fr; }
  .icl-est__loan-item--wide { grid-column: auto; }
}
