/* ═══════════════════════════════════════════
   CheckNow Design System — Breadcrumb
   ═══════════════════════════════════════════ */

/* ── Overlay layer inside Hero ── */
.cn-breadcrumb {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 0 90px;
    pointer-events: none;
    box-sizing: border-box;
    max-width: 1296px;
    margin: 0 auto;
}
.cn-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 24px 0 0;
    font-size: 14px;
    pointer-events: auto;
}
.cn-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cn-text-muted);
}
.cn-breadcrumb li::after {
    content: '›';
    font-size: 18px;
    color: var(--cn-border);
}
.cn-breadcrumb li:last-child::after {
    content: none;
}
.cn-breadcrumb a {
    color: var(--cn-text-muted);
    text-decoration: none;
    transition: color .15s;
}
.cn-breadcrumb a:hover {
    color: var(--cn-primary);
}
.cn-breadcrumb__current {
    color: var(--cn-text);
    font-weight: var(--cn-font-medium);
}

/* ── Hero 内容区为面包屑预留顶部空间 ── */
.cn-hero-has-breadcrumb {
    padding-top: 60px !important;
}

/* Hub 标题跟在面包屑的实际高度之后，面包屑换行时也不会重叠。 */
.cn-tp-hub-hero.cn-hero-has-breadcrumb,
.cn-vehicle-hub-hero.cn-hero-has-breadcrumb {
    padding-top: 0 !important;
}
.cn-tp-hub-hero > .cn-breadcrumb,
.cn-vehicle-hub-hero > .cn-breadcrumb {
    position: relative;
    top: 0 !important;
}
.cn-tp-hub-hero > [class$="__inner"],
.cn-vehicle-hub-hero > [class$="__inner"] {
    padding-top: 24px;
}

/* 登录态 sticky header 下移后，其视觉高度会多出 admin bar 的高度。 */
body.admin-bar .cn-tp-hub,
body.admin-bar .cn-vehicle-hub,
body.admin-bar .cn-vehicle-single,
body.admin-bar .cn-tpm-hero {
    margin-top: var(--wp-admin--admin-bar--height, 32px);
}

/* ponytail: 登录态 admin bar(fixed top:0 高32px) 会把 sticky header 压到 top:32px，
   header 视觉下缘超出其流占位，恰好盖住 hero 顶部的面包屑。把 overlay 面包屑下移
   admin-bar 高度，避开被 header 覆盖的顶部区域。变量由 WP 注入，动画等效于 jobs 补偿。 */
body.admin-bar .cn-breadcrumb:not(.cn-breadcrumb--standalone) {
    top: var(--wp-admin--admin-bar--height, 32px);
}
body.admin-bar .cn-tpm-hero > .cn-breadcrumb {
    top: 0;
}

/* ── Standalone mode (no Hero, normal flow) ── */
.cn-breadcrumb--standalone {
    position: relative;
    padding: 20px 48px 0;
    max-width: 1296px;
    margin: 0 auto;
}
.cn-breadcrumb--standalone ol {
    padding: 0;
}

/* ── Dark Hero 上的面包屑（浅色文字） ── */
.cn-hero--dark .cn-breadcrumb a {
    color: rgba(255,255,255,.65) !important;
}
.cn-hero--dark .cn-breadcrumb a:hover {
    color: #e4b62d !important;
}
.cn-hero--dark .cn-breadcrumb li {
    color: rgba(255,255,255,.65) !important;
}
.cn-hero--dark .cn-breadcrumb li::after {
    color: rgba(255,255,255,.25) !important;
}
.cn-hero--dark .cn-breadcrumb .cn-breadcrumb__current {
    color: #E4B642 !important;
}

@media (max-width: 768px) {
    .cn-breadcrumb {
        padding: 0 20px;
    }
    .cn-breadcrumb ol {
        padding: 16px 0 0;
        font-size: 13px;
    }
    .cn-hero-has-breadcrumb {
        padding-top: 48px !important;
    }
    .cn-breadcrumb--standalone {
        padding: 14px 20px 0;
    }
}
