/* =====================================================================
   Breadcrumb — modern, no background, refined separator.
   Scoped to .zyla-breadcrumb / .zyla-breadcrumb-nav so it does not
   collide with Bootstrap's default .breadcrumb styling elsewhere.

   Loaded by:
     - resources/views/shared/web/breadcrumbs.blade.php   (marketplace)
     - resources/views/shared/dashboard/breadcrumbs.blade.php (dashboard)
   ===================================================================== */

.zyla-breadcrumb-nav {
    margin: 0 0 18px;
}

/* Dashboard variant: ensure breadcrumb sits flush with the content-wrapper
   left edge and gets a bit of breathing room above the page header. */
.zyla-breadcrumb-nav--dashboard {
    margin: 0 0 var(--space-4, 16px);
    padding: 0;
}

.zyla-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: 13px;
    line-height: 1.4;
    list-style: none;
}

.zyla-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: var(--fg-secondary, var(--zyla-text-muted, #6b7280));
    font-weight: 450;
    line-height: 1.4;
    padding: 0 !important;
}

/* Plain (non-link) items render as <span> in the dashboard component;
   keep them visually identical to <a> text but without hover affordance. */
.zyla-breadcrumb .breadcrumb-item > span {
    padding: 4px 8px;
}

.zyla-breadcrumb .breadcrumb-item a {
    color: var(--fg-secondary, var(--zyla-text-muted, #6b7280));
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 140ms ease, color 140ms ease;
}

.zyla-breadcrumb .breadcrumb-item a:hover {
    background: var(--bg-hover, var(--zyla-hover-bg, #f5f5f5));
    color: var(--fg, var(--zyla-text-primary, #111827));
    text-decoration: none;
}

/* Last item (current page) — primary text, slightly heavier */
.zyla-breadcrumb .breadcrumb-item.active {
    color: var(--fg, var(--zyla-text-primary, #111827));
    font-weight: 500;
}

.zyla-breadcrumb .breadcrumb-item.active > span {
    color: var(--fg, var(--zyla-text-primary, #111827));
    font-weight: 500;
}

/* When the active item is a link (e.g. marketplace API page), keep the dark
   active styling on the anchor itself and avoid double padding from the <li>. */
.zyla-breadcrumb .breadcrumb-item.active:has(a) {
    padding: 0;
}

.zyla-breadcrumb .breadcrumb-item.active a {
    color: var(--fg, var(--zyla-text-primary, #111827));
    font-weight: 500;
}

.zyla-breadcrumb .breadcrumb-item.active a:hover {
    background: var(--bg-hover, var(--zyla-hover-bg, #f5f5f5));
    color: var(--fg, var(--zyla-text-primary, #111827));
}

/* Separator — slim chevron via CSS, no Bootstrap "/" pseudo-element */
.zyla-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 8px 0 4px;
    border-top: 1.4px solid currentColor;
    border-right: 1.4px solid currentColor;
    transform: rotate(45deg);
    padding: 0 !important;
    color: var(--fg-secondary, rgba(15, 23, 42, 0.32));
    opacity: 0.55;
    flex: 0 0 auto;
}

/* Override Bootstrap's default left padding on the pseudo-element */
.zyla-breadcrumb .breadcrumb-item + .breadcrumb-item {
    padding-left: 0 !important;
}

/* Tighter spacing on small screens */
@media (max-width: 480px) {
    .zyla-breadcrumb {
        font-size: 12px;
    }
    .zyla-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 6px 0 2px;
    }
}
