/* ========================================
   入国書類チェッカー スタイル
   SWELL干渉回避のため .entry-tool- プレフィックス使用
   ======================================== */

#entry-tool {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  color: #1f2937;
  line-height: 1.6;
}

#entry-tool *, #entry-tool *::before, #entry-tool *::after { box-sizing: border-box; }

/* ヘッダー */
.entry-tool-header { text-align: center; margin-bottom: 24px; }
.entry-tool-header h2 { font-size: 24px; font-weight: 700; color: #111827; margin: 0 0 8px; padding: 0; border: none; }
.entry-tool-header .entry-tool-subtitle { font-size: 14px; color: #6b7280; margin: 0; }

/* フィルターバー */
.entry-tool-filter {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 20px 24px; display: flex; gap: 16px; align-items: flex-end; margin-bottom: 24px;
}
.entry-tool-filter-group { flex: 1; min-width: 0; }
.entry-tool-filter-group label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.entry-tool-filter-group select {
  width: 100%; padding: 10px 36px 10px 14px; font-size: 15px;
  border: 2px solid #e5e7eb; border-radius: 8px; background: #fff; color: #111827;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.entry-tool-filter-group select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }

/* 初期メッセージ */
.entry-tool-empty { text-align: center; padding: 60px 20px; }
.entry-tool-empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; background: #eff6ff; border-radius: 50%; margin-bottom: 16px;
}
.entry-tool-empty-icon svg { width: 28px; height: 28px; color: #60a5fa; }
.entry-tool-empty p { font-size: 15px; color: #6b7280; margin: 0; }

/* 国カード（選択後の上部サマリー） */
.entry-tool-country-card {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff; border-radius: 16px; padding: 28px 28px 24px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.entry-tool-country-card::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.entry-tool-country-name { font-size: 28px; font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.entry-tool-country-name .entry-tool-flag { font-size: 32px; }
.entry-tool-country-sub { font-size: 14px; opacity: 0.8; margin: 0 0 20px; }

.entry-tool-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.entry-tool-summary-item { background: rgba(255,255,255,0.12); border-radius: 10px; padding: 12px; text-align: center; }
.entry-tool-summary-item .entry-tool-sum-label { font-size: 11px; opacity: 0.75; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.entry-tool-summary-item .entry-tool-sum-value { font-size: 16px; font-weight: 700; margin: 0; }

/* セクション */
.entry-tool-section { margin-bottom: 20px; }
.entry-tool-section-title {
  font-size: 16px; font-weight: 700; color: #111827; margin: 0 0 12px;
  padding: 0 0 8px; border-bottom: 2px solid #e5e7eb;
  display: flex; align-items: center; gap: 8px;
}
.entry-tool-section-title svg { width: 20px; height: 20px; color: #2563eb; flex-shrink: 0; }

/* 書類カード */
.entry-tool-doc-list { display: flex; flex-direction: column; gap: 8px; }
.entry-tool-doc {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.entry-tool-doc:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37,99,235,0.08); }

.entry-tool-doc-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.entry-tool-doc-icon.required { background: #fef2f2; }
.entry-tool-doc-icon.recommended { background: #fffbeb; }
.entry-tool-doc-icon.conditional { background: #f0fdf4; }

.entry-tool-doc-body { flex: 1; min-width: 0; }
.entry-tool-doc-name { font-size: 14px; font-weight: 600; color: #111827; margin: 0 0 2px; }
.entry-tool-doc-desc { font-size: 12px; color: #6b7280; margin: 0; }

.entry-tool-badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.entry-tool-badge.required { background: #fef2f2; color: #dc2626; }
.entry-tool-badge.recommended { background: #fffbeb; color: #d97706; }
.entry-tool-badge.conditional { background: #f0fdf4; color: #16a34a; }

/* 条件付きルール */
.entry-tool-rule {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 14px 16px;
}
.entry-tool-rule-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.entry-tool-rule-body { flex: 1; }
.entry-tool-rule-text { font-size: 13px; color: #92400e; margin: 0 0 4px; font-weight: 500; }
.entry-tool-rule-action { font-size: 12px; color: #b45309; margin: 0; }

/* 注意事項 */
.entry-tool-notes {
  background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 16px;
}
.entry-tool-notes p { font-size: 13px; color: #0369a1; margin: 0; line-height: 1.7; }

/* 参照元URL */
.entry-tool-sources {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.entry-tool-source-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 999px; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.entry-tool-source-link:hover {
  background: #dbeafe; border-color: #93c5fd;
  box-shadow: 0 2px 6px rgba(37,99,235,0.12);
}
.entry-tool-source-link svg { flex-shrink: 0; color: #60a5fa; }

/* 更新日バッジ */
.entry-tool-updated {
  display: inline-block; margin-left: 12px;
  padding: 2px 10px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px; vertical-align: middle;
}

/* 注釈・免責 */
.entry-tool-footer {
  margin-top: 24px; padding: 16px 20px;
  background: #fefce8; border: 1px solid #fde68a; border-radius: 10px;
}
.entry-tool-footer-icon { font-size: 16px; margin-right: 4px; }
.entry-tool-footer p {
  font-size: 12px; color: #92400e; margin: 0 0 4px; line-height: 1.6;
}
.entry-tool-footer p:last-child { margin-bottom: 0; }

/* レスポンシブ */
@media (max-width: 600px) {
  .entry-tool-filter { flex-direction: column; gap: 4px; padding: 16px; }
  .entry-tool-filter-group { width: 100%; }
  .entry-tool-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-tool-country-card { padding: 20px; }
  .entry-tool-country-name { font-size: 22px; }
  .entry-tool-header h2 { font-size: 18px; }
  .entry-tool-doc { padding: 12px; }
}
