/* ============================================================
   TOOL PAGES — Breadcrumb, Interactive Area, Educational,
   FAQ, Author Card, Related Sections
   ============================================================ */

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: #2563eb;
}
.breadcrumb .separator {
  color: #94a3b8;
}

/* --- Tool Interactive Area --- */
.tool-interactive {
  margin: 1.5rem 0;
}

/* Loading state (shown before React mounts) */
.tool-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: #64748b;
  gap: 1rem;
}
.tool-loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: tool-spin 0.8s linear infinite;
}
@keyframes tool-spin {
  to { transform: rotate(360deg); }
}
.tool-loading p {
  margin: 0;
  font-size: 0.9rem;
}

/* When React mounts, hide the static breadcrumb/title above */
#tool-app .space-y-6 > nav.flex,
#tool-app .space-y-6 > .flex.items-start {
  /* ToolPage wrapper renders its own breadcrumb and header */
}

.tool-noscript {
  color: #dc2626;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

/* --- Educational Sections --- */
.edu-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.edu-section h2 {
  color: #0d1b2a;
  margin-top: 0;
}
.edu-section h3 {
  color: #334155;
}

/* --- Transparency Section --- */
.transparency-section {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.transparency-section h2 {
  margin-top: 0;
  color: #92400e;
}

/* --- FAQ Section (CSS-only accordion with details/summary) --- */
.faq-section {
  margin: 2rem 0;
}
.faq-section details {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-section summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-section summary::-webkit-details-marker {
  display: none;
}
.faq-section summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: #94a3b8;
  transition: transform 0.2s ease;
}
.faq-section details[open] summary::after {
  content: '−';
}
.faq-section details[open] summary {
  border-bottom: 1px solid #e2e8f0;
}
.faq-answer {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

/* --- Related Post Card --- */
.related-post {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}
.related-post:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  text-decoration: none;
}
.related-post img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}
.related-post-label {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: #1e40af;
  font-weight: 700;
}
.related-post-title {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
}
.related-post-meta {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

/* --- Related Tool Card (in blog posts) --- */
.related-tool {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.related-tool h3 {
  margin-top: 0;
  color: #166534;
}

/* --- Author Card --- */
.author-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 2rem 0;
}
.author-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-name {
  margin: 0;
  font-weight: 700;
}
.author-bio {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .related-post {
    flex-direction: column;
  }
  .author-card {
    flex-direction: column;
    text-align: center;
  }
}
