/* 家族の通信費まるごと節約診断ツール CSS */

/* ── リセット & 基本 ────────────────────────────── */
.fcc-tool *,
.fcc-tool *::before,
.fcc-tool *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.fcc-tool {
  font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
  color: #333;
  line-height: 1.7;
}

/* Cocoon テーマとの競合回避 */
.fcc-tool a { text-decoration: none; }
.fcc-tool ul,
.fcc-tool ol { list-style: none; padding: 0; margin: 0; }
.fcc-tool input,
.fcc-tool select,
.fcc-tool button { font-family: inherit; }

/* ── ヘッダー ───────────────────────────────────── */
.fcc-header {
  text-align: center;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 32px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.fcc-header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.fcc-title {
  font-size: 1.6em;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  color: #fff;
  border: none;
  padding: 0;
}
.fcc-header p {
  font-size: 0.95em;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  margin: 0;
}

/* ── キャラクター吹き出し ──────────────────────── */
.fcc-character {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0;
  padding: 0 8px;
}
.fcc-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 3px solid #667eea;
  background: #e8eaf6;
}
.fcc-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.fcc-bubble {
  background: #f0f2ff;
  border-radius: 16px;
  padding: 16px 20px;
  position: relative;
  border: 1px solid #d5d9f2;
  flex: 1;
  font-size: 0.93em;
}
.fcc-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 20px;
  border: 6px solid transparent;
  border-right-color: #d5d9f2;
}
.fcc-bubble::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 21px;
  border: 5px solid transparent;
  border-right-color: #f0f2ff;
}
.fcc-bubble strong {
  color: #5c6bc0;
}

/* ── ステップインジケーター ─────────────────────── */
.fcc-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.fcc-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
  background: #e0e0e0;
  color: #999;
  transition: all 0.3s;
}
.fcc-step-dot.active {
  background: #667eea;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}
.fcc-step-dot.done {
  background: #4caf50;
  color: #fff;
}

/* ── カード ─────────────────────────────────────── */
.fcc-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.fcc-card-title {
  font-size: 1.1em;
  font-weight: 700;
  color: #5c6bc0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 0;
}
.fcc-card-title .icon {
  font-size: 1.3em;
}

/* ── 家族メンバーフォーム ──────────────────────── */
.fcc-member {
  background: #fafafa;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #eee;
  position: relative;
  transition: box-shadow 0.2s;
}
.fcc-member:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.fcc-member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.fcc-member-title {
  font-weight: 600;
  color: #555;
  font-size: 0.95em;
}
.fcc-remove-btn {
  background: none;
  border: none;
  color: #e57373;
  font-size: 1.2em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.fcc-remove-btn:hover {
  background: #ffebee;
}
.fcc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 500px) {
  .fcc-form-row {
    grid-template-columns: 1fr;
  }
}
.fcc-form-group {
  display: flex;
  flex-direction: column;
}
.fcc-form-group label {
  font-size: 0.82em;
  color: #777;
  margin-bottom: 4px;
  font-weight: 500;
}
.fcc-form-group select,
.fcc-form-group input[type="number"] {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95em;
  transition: border-color 0.2s;
  background: #fff;
  width: 100%;
  -webkit-appearance: none;
}
.fcc-form-group select:focus,
.fcc-form-group input[type="number"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.fcc-cost-input {
  position: relative;
}
.fcc-cost-input input {
  padding-right: 30px !important;
}
.fcc-cost-input::after {
  content: '円';
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #999;
  font-size: 0.9em;
  pointer-events: none;
}

/* ── ボタン ─────────────────────────────────────── */
.fcc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.fcc-btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.fcc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
  color: #fff;
}
.fcc-btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}
.fcc-btn-secondary:hover {
  background: #eee;
}
.fcc-btn-add {
  background: #e8f5e9;
  color: #4caf50;
  border: 1px dashed #4caf50;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.fcc-btn-add:hover {
  background: #c8e6c9;
}
.fcc-btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ── 結果セクション ────────────────────────────── */
.fcc-savings-hero {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 16px;
  margin-bottom: 24px;
}
.fcc-savings-amount {
  font-size: 2.8em;
  font-weight: 800;
  color: #2e7d32;
  margin: 8px 0;
}
.fcc-savings-amount small {
  font-size: 0.35em;
  color: #666;
  font-weight: 400;
}
.fcc-savings-yearly {
  font-size: 1.1em;
  color: #558b2f;
  font-weight: 600;
}

/* ── 比較バー ──────────────────────────────────── */
.fcc-compare-bar {
  margin: 24px 0;
}
.fcc-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.fcc-bar-label {
  width: 60px;
  font-size: 0.85em;
  font-weight: 600;
  color: #666;
  text-align: right;
  flex-shrink: 0;
}
.fcc-bar-track {
  flex: 1;
  height: 36px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.fcc-bar-fill {
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.85em;
  font-weight: 700;
  color: #fff;
  transition: width 1s ease;
  width: 0;
}
.fcc-bar-fill.current {
  background: linear-gradient(90deg, #ef5350, #e53935);
}
.fcc-bar-fill.after {
  background: linear-gradient(90deg, #66bb6a, #43a047);
}

/* ── プランカード ──────────────────────────────── */
.fcc-plan-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
.fcc-plan-card {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
  position: relative;
}
.fcc-plan-card.best {
  border-color: #667eea;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}
.fcc-plan-card.best::before {
  content: 'おすすめ';
  position: absolute;
  top: -12px;
  left: 16px;
  background: #667eea;
  color: #fff;
  padding: 2px 12px;
  border-radius: 6px;
  font-size: 0.8em;
  font-weight: 600;
}
.fcc-plan-name {
  font-weight: 700;
  font-size: 1.1em;
  color: #333;
  margin-bottom: 4px;
}
.fcc-plan-price {
  font-size: 1.4em;
  font-weight: 800;
  color: #5c6bc0;
}
.fcc-plan-price small {
  font-size: 0.5em;
  color: #999;
  font-weight: 400;
}
.fcc-plan-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.fcc-plan-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88em;
  color: #666;
  padding: 3px 0;
}
.fcc-plan-saving {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  display: inline-block;
  margin-top: 8px;
}

/* ── 注意書き ──────────────────────────────────── */
.fcc-note {
  font-size: 0.82em;
  color: #999;
  margin-top: 24px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
  border-left: 3px solid #ddd;
}

/* ── セクション表示/非表示 ─────────────────────── */
.fcc-section {
  display: none;
}
.fcc-section.active {
  display: block;
}

/* ── アニメーション ────────────────────────────── */
@keyframes fcc-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fcc-animate {
  animation: fcc-fadein 0.4s ease;
}

/* ── データ使用量スライダー ────────────────────── */
.fcc-slider-group {
  margin: 8px 0;
}
.fcc-slider-group input[type="range"] {
  width: 100%;
  margin: 4px 0;
  accent-color: #667eea;
}
.fcc-slider-value {
  text-align: right;
  font-size: 0.85em;
  color: #667eea;
  font-weight: 600;
}

/* ── インターネット回線 ────────────────────────── */
.fcc-internet-section {
  border-top: 2px dashed #e0e0e0;
  padding-top: 16px;
  margin-top: 8px;
}

/* ── Cocoon テーマ上書き ───────────────────────── */
.entry-content .fcc-tool p {
  margin-bottom: 0;
}
.entry-content .fcc-tool .fcc-member {
  margin-bottom: 12px;
}
.fcc-tool .fcc-header p {
  margin: 0;
}
.fcc-tool label {
  display: block;
}

/* ── レスポンシブ ──────────────────────────────── */
@media (max-width: 600px) {
  .fcc-tool {
    padding: 10px 0;
  }
  .fcc-header {
    padding: 24px 16px;
    border-radius: 12px;
  }
  .fcc-header h2 {
    font-size: 1.3em;
  }
  .fcc-card {
    padding: 16px;
  }
  .fcc-savings-amount {
    font-size: 2em;
  }
  .fcc-character {
    gap: 10px;
    padding: 0 4px;
  }
  .fcc-avatar,
  .fcc-avatar-placeholder {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  .fcc-bubble {
    padding: 12px 14px;
    font-size: 0.88em;
  }
}
