/* ═══════════════════════════════════════════
   Smart Breadcrumbs — Frontend Styles
   ═══════════════════════════════════════════ */

/* CSS Variables — overridden by inline style from PHP */
.sb-nav {
    --sb-color-link:    #378ADD;
    --sb-color-current: #888780;
    --sb-color-sep:     #B4B2A9;
    --sb-color-bg:      transparent;
    --sb-font-size:     13px;

    font-size: var(--sb-font-size);
    background: var(--sb-color-bg);
    width: 100%;
    box-sizing: border-box;
    padding: 6px 0;
}

/* ── List ── */
.sb-nav .sb-list {
    list-style: none;
    margin:  0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    line-height: 1.5;
}

/* ── Alignment ── */
.sb-nav.sb-align-right  .sb-list { justify-content: flex-end; }
.sb-nav.sb-align-left   .sb-list { justify-content: flex-start; }
.sb-nav.sb-align-center .sb-list { justify-content: center; }

/* ── Items ── */
.sb-nav .sb-item {
    display: inline-flex;
    align-items: center;
}

/* ── Links ── */
.sb-nav .sb-link {
    color: var(--sb-color-link);
    text-decoration: none;
    transition: opacity .15s;
}
.sb-nav .sb-link:hover { opacity: .75; text-decoration: underline; }

/* ── Current (last item) ── */
.sb-nav .sb-current {
    color: var(--sb-color-current);
}

/* ── Separator ── */
.sb-nav .sb-sep {
    color: var(--sb-color-sep);
    margin: 0 4px;
    font-size: .9em;
    user-select: none;
}

/* ═══════════════════════════════════════════
   STYLE: Simple (default — already done above)
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   STYLE: Pills
   ═══════════════════════════════════════════ */
.sb-nav.sb-style-pills .sb-list { gap: 6px; }

.sb-nav.sb-style-pills .sb-item { gap: 0; }

.sb-nav.sb-style-pills .sb-link,
.sb-nav.sb-style-pills .sb-current {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid currentColor;
    line-height: 1.4;
}

.sb-nav.sb-style-pills .sb-link {
    color: var(--sb-color-link);
    border-color: var(--sb-color-link);
}
.sb-nav.sb-style-pills .sb-link:hover {
    background: var(--sb-color-link);
    color: #fff;
    opacity: 1;
    text-decoration: none;
}

.sb-nav.sb-style-pills .sb-current {
    border-color: var(--sb-color-current);
}

.sb-nav.sb-style-pills .sb-sep { display: none; }

/* ═══════════════════════════════════════════
   STYLE: Arrow (e-commerce style)
   ═══════════════════════════════════════════ */
.sb-nav.sb-style-arrow { padding: 0; }

.sb-nav.sb-style-arrow .sb-list { gap: 0; }

.sb-nav.sb-style-arrow .sb-item {
    position: relative;
    background: #f0f0f0;
    padding: 6px 18px 6px 10px;
    margin-left: 12px;
    clip-path: polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%,10px 50%);
}

.sb-nav.sb-style-arrow .sb-item:first-child {
    clip-path: polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%);
    margin-left: 0;
}

.sb-nav.sb-style-arrow .sb-item.sb-current {
    background: var(--sb-color-link);
}

.sb-nav.sb-style-arrow .sb-item.sb-current .sb-current {
    color: #fff;
}

.sb-nav.sb-style-arrow .sb-link {
    color: #555;
}

.sb-nav.sb-style-arrow .sb-sep { display: none; }

/* ═══════════════════════════════════════════
   STYLE: Minimal (underline only)
   ═══════════════════════════════════════════ */
.sb-nav.sb-style-minimal { border-bottom: 1px solid #e5e5e5; padding-bottom: 8px; }

.sb-nav.sb-style-minimal .sb-link {
    color: var(--sb-color-current);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.sb-nav.sb-style-minimal .sb-link:hover {
    border-bottom-color: var(--sb-color-current);
    opacity: 1;
}

/* ═══════════════════════════════════════════
   RTL support
   ═══════════════════════════════════════════ */
[dir="rtl"] .sb-nav.sb-style-arrow .sb-item {
    clip-path: polygon(10px 0,100% 0,100% 100%,10px 100%,0 50%);
    margin-left: 0;
    margin-right: 12px;
    padding: 6px 10px 6px 18px;
}
[dir="rtl"] .sb-nav.sb-style-arrow .sb-item:first-child {
    clip-path: polygon(0 0,100% 0,100% 100%,10px 100%,0 50%);
    margin-right: 0;
}

/* ═══════════════════════════════════════════
   Blocksy integration: reset conflicting styles
   ═══════════════════════════════════════════ */
.sb-nav,
.sb-nav *,
.sb-nav *::before,
.sb-nav *::after {
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
    .sb-nav { font-size: calc(var(--sb-font-size) - 1px); }
    .sb-nav.sb-style-arrow .sb-item { padding: 5px 14px 5px 8px; }
}
