/* Breadcrumb Navigation for Furo Theme */
/* Matches Furo's design language and CSS variables */

.bd-breadcrumbs {
  background: var(--color-background-secondary, #f8fafc);
  border-bottom: 1px solid var(--color-background-border, #cbd5e1);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.bd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}

.bd-breadcrumb-item {
  display: flex;
  align-items: center;
}

.bd-breadcrumb-item:not(:last-child)::after {
  content: "›";
  color: var(--color-foreground-muted, #6b7280);
  margin: 0 0.5rem;
  font-weight: 400;
}

.bd-breadcrumb-link {
  color: var(--color-link, #2563eb);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
  font-weight: 500;
}

.bd-breadcrumb-link:hover {
  color: var(--color-link--hover, #1d4ed8);
  text-decoration: underline;
}

.bd-breadcrumb-item.active {
  color: var(--color-foreground-primary, #111827);
  font-weight: 600;
}

/* Dark mode support using Furo's CSS variables */
[data-theme="dark"] .bd-breadcrumbs {
  background: var(--color-background-secondary, #1e293b);
  border-bottom-color: var(--color-background-border, #475569);
}

[data-theme="dark"] .bd-breadcrumb-item:not(:last-child)::after {
  color: var(--color-foreground-muted, #9ca3af);
}

[data-theme="dark"] .bd-breadcrumb-link {
  color: var(--color-link, #60a5fa);
}

[data-theme="dark"] .bd-breadcrumb-link:hover {
  color: var(--color-link--hover, #3b82f6);
}

[data-theme="dark"] .bd-breadcrumb-item.active {
  color: var(--color-foreground-primary, #f9fafb);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .bd-breadcrumbs {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .bd-breadcrumb {
    gap: 0.125rem;
  }

  .bd-breadcrumb-item:not(:last-child)::after {
    margin: 0 0.375rem;
  }

  /* Hide intermediate breadcrumbs on very small screens */
  @media (max-width: 480px) {
    .bd-breadcrumb-item:not(:first-child):not(:last-child):not(.active) {
      display: none;
    }

    .bd-breadcrumb-item:nth-last-child(2)::after {
      content: "…";
    }
  }
}

/* Integration with Furo's content layout */
.content-wrapper .bd-breadcrumbs {
  margin-left: -1rem;
  margin-right: -1rem;
  margin-top: -1rem;
}

/* AutoAPI specific styling */
.bd-breadcrumb-item[data-type="autoapi"] .bd-breadcrumb-link::before {
  content: "📚 ";
  opacity: 0.7;
}

.bd-breadcrumb-item[data-type="module"] .bd-breadcrumb-link::before {
  content: "📁 ";
  opacity: 0.7;
}

.bd-breadcrumb-item[data-type="class"] .bd-breadcrumb-link::before {
  content: "🏗️ ";
  opacity: 0.7;
}

/* Print styles */
@media print {
  .bd-breadcrumbs {
    display: none;
  }
}
