/**
 * SDI診断フォーム — isvd.or.jp/sdi-check 埋め込み用CSS
 * data.isvd.or.jp から配信（WordPress wpautop対策）
 */
.sdi-form-container {
  max-width: 720px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sdi-form-container h2 {
  display: none;
}
.sdi-form-container .sdi-lead {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.sdi-field {
  margin-bottom: 1.5rem;
}
.sdi-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #333;
}
.sdi-field .sdi-hint {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.4rem;
}
.sdi-field textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.sdi-field textarea:focus {
  outline: none;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
.sdi-field .sdi-char-count {
  text-align: right;
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 0.25rem;
}
.sdi-field .sdi-char-count.over {
  color: #dc2626;
}
.sdi-org-toggle {
  margin-bottom: 1.5rem;
}
.sdi-org-toggle summary {
  cursor: pointer;
  color: #16a34a;
  font-size: 0.9rem;
  font-weight: 500;
}
.sdi-org-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.sdi-org-fields input,
.sdi-org-fields select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.sdi-org-fields label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.25rem;
}
.sdi-submit-btn {
  display: block;
  width: 100%;
  padding: 0.9rem;
  background: #16a34a;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.sdi-submit-btn:hover {
  background: #15803d;
}
.sdi-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}
.sdi-loading {
  display: none;
  text-align: center;
  padding: 2rem;
  color: #666;
}
.sdi-loading .sdi-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: sdi-spin 0.8s linear infinite;
}
@keyframes sdi-spin {
  to { transform: rotate(360deg); }
}
.sdi-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.sdi-result {
  display: none;
}
.sdi-result-header {
  text-align: center;
  margin-bottom: 2rem;
}
.sdi-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}
.sdi-grade-A { background: #16a34a; }
.sdi-grade-B { background: #2563eb; }
.sdi-grade-C { background: #d97706; }
.sdi-grade-D { background: #dc2626; }
.sdi-score-total {
  font-size: 1.1rem;
  color: #666;
}
.sdi-summary-text {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: #333;
}
.sdi-chart-container {
  max-width: 400px;
  margin: 0 auto 2rem;
}
.sdi-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}
.sdi-strengths {
  margin-bottom: 1.5rem;
}
.sdi-strengths li {
  padding: 0.4rem 0;
  color: #16a34a;
  font-weight: 500;
}
.sdi-improvements {
  margin-bottom: 1.5rem;
}
.sdi-improvement-item {
  background: #fffbeb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.sdi-improvement-item .axis-name {
  font-weight: 600;
  color: #d97706;
}
.sdi-improvement-item .suggestion {
  color: #555;
  margin-top: 0.25rem;
}
.sdi-next-step {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.sdi-next-step .label {
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 0.25rem;
}
.sdi-cta {
  background: #f0fdf4;
  border: 2px solid rgba(22, 163, 74, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}
.sdi-cta p {
  margin: 0.5rem 0;
  color: #555;
  line-height: 1.6;
}
.sdi-cta a {
  color: #16a34a;
  font-weight: 600;
  text-decoration: none;
}
.sdi-cta a:hover {
  text-decoration: underline;
}
.sdi-retry-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  background: #f3f4f6;
  color: #333;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.sdi-retry-btn:hover {
  background: #e5e7eb;
}
