/* =============================================
   AI足指チェッカー スタイル
   SWELL テーマ対応済み
   ============================================= */

/* ===== ラッパー ===== */
.aifc-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: #333;
  box-sizing: border-box;
}

.aifc-wrap *,
.aifc-wrap *::before,
.aifc-wrap *::after {
  box-sizing: border-box;
}

/* ===== タイトル ===== */
.aifc-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px;
  color: #222;
}

.aifc-desc {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 24px;
}

/* ===== アップロードエリア ===== */
.aifc-upload-area {
  border: 2px dashed #b0c4de;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.aifc-upload-area:hover {
  border-color: #4a90d9;
  background: #eef5ff;
}

.aifc-upload-area.aifc-dragover {
  border-color: #4a90d9;
  background: #ddeeff;
}

.aifc-upload-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.aifc-upload-text {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

.aifc-upload-text span {
  font-size: 0.8rem;
  color: #999;
}

/* ===== プレビュー ===== */
.aifc-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.aifc-preview img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aifc-remove-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: #666;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.aifc-remove-btn:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* ===== フォームフッター ===== */
.aifc-form-footer {
  margin-top: 20px;
  text-align: center;
}

/* ===== ボタン ===== */
.aifc-btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
}

.aifc-btn:hover:not(:disabled) {
  opacity: 0.88;
}

.aifc-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.aifc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.aifc-btn-primary {
  background: #4a90d9;
  color: #fff;
  min-width: 180px;
}

.aifc-btn-secondary {
  background: #f0f0f0;
  color: #444;
}

/* ===== 免責表示 ===== */
.aifc-disclaimer {
  font-size: 0.75rem;
  color: #999;
  margin-top: 16px;
  text-align: center;
  line-height: 1.5;
}

/* ===== スコアブロック ===== */
.aifc-score-block {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 20px;
}

.aifc-score-circle {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f4f8;
  border: 4px solid #b0c4de;
  transition: border-color 0.3s;
}

/* スコア色 */
.aifc-score-circle.aifc-score-good     { border-color: #27ae60; background: #edfdf5; }
.aifc-score-circle.aifc-score-caution  { border-color: #2ecc71; background: #f0fdf4; }
.aifc-score-circle.aifc-score-warning  { border-color: #f39c12; background: #fffbf0; }
.aifc-score-circle.aifc-score-bad      { border-color: #e74c3c; background: #fff5f5; }

.aifc-score-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #222;
}

.aifc-score-label {
  font-size: 0.75rem;
  color: #888;
}

.aifc-score-info {
  flex: 1;
}

.aifc-foot-type {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
}

.aifc-summary {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* ===== 詳細チェック項目 ===== */
.aifc-issues-block,
.aifc-recommendations-block,
.aifc-article-block {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.aifc-issues-block h3,
.aifc-recommendations-block h3,
.aifc-article-block h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: #333;
  border-left: 4px solid #4a90d9;
  padding-left: 10px;
}

/* SWELL テーマのh3スタイルを上書き */
.aifc-wrap h3 {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-left: 4px solid #4a90d9 !important;
  padding-left: 10px !important;
  font-size: 1rem !important;
  margin: 0 0 14px !important;
}

.aifc-issues-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aifc-issue-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 14px;
}

.aifc-issue-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  margin-right: 8px;
}

.aifc-severity-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 6px;
}

.aifc-sev-none     { background: #eaf7f0; color: #27ae60; }
.aifc-sev-mild     { background: #fef9e7; color: #f39c12; }
.aifc-sev-moderate { background: #fef0e0; color: #e67e22; }
.aifc-sev-severe   { background: #fdecea; color: #e74c3c; }

.aifc-angle {
  font-size: 0.78rem;
  color: #888;
}

.aifc-issue-comment {
  font-size: 0.85rem;
  color: #555;
  margin: 6px 0 0;
  line-height: 1.6;
}

/* ===== 改善アドバイス ===== */
.aifc-recommendations-list {
  padding: 0 0 0 20px;
  margin: 0;
}

.aifc-recommendations-list li {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ===== 関連記事 ===== */
.aifc-article-link {
  display: inline-block;
  color: #4a90d9;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #4a90d9;
  padding-bottom: 2px;
}

.aifc-article-link:hover {
  opacity: 0.75;
}

/* ===== 残り回数 ===== */
.aifc-remaining {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin: 12px 0;
}

/* ===== もう一度ボタン ===== */
.aifc-retry-block {
  text-align: center;
  margin: 20px 0 8px;
}

/* ===== エラーブロック ===== */
.aifc-error-block {
  background: #fff5f5;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.aifc-error-block p {
  color: #c0392b;
  font-size: 0.95rem;
  margin: 0 0 16px;
  line-height: 1.6;
}

/* ===== レスポンシブ ===== */
@media (max-width: 480px) {
  .aifc-score-block {
    flex-direction: column;
    text-align: center;
  }

  .aifc-score-info {
    text-align: center;
  }

  .aifc-btn-primary {
    width: 100%;
  }
}
