/* ===== BuddyBar 6.3 on the website =====
   The demo bars are drawn the way the 6.3 bar is: one row of icons, groups as
   lines between swatches, Check and the lens on the bar. Everything they say
   comes from the apps' own rules (js/buddybar-core.js). */

.b3 {
    --b3-ink: #111827;
    --b3-text: #374151;
    --b3-muted: #6b7280;
    --b3-line: #e7e5e0;
    --b3-hover: #f6f5f2;
    --b3-amber: #D4A24C;
    --b3-green: #5CAD6B;
    --b3-teal: #3E8E86;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--b3-text);
    -webkit-font-smoothing: antialiased;
}

.b3-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: 14px;
    padding: 8px 10px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16), 0 1px 2px rgba(15, 23, 42, 0.08);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.b3-grip {
    display: grid;
    grid-template-rows: repeat(3, 3px);
    gap: 3px;
    padding: 0 4px 0 2px;
    cursor: grab;
}
.b3-grip i { width: 3px; height: 3px; border-radius: 50%; background: #b8b5ae; }
.b3-label { font-size: 12px; font-weight: 500; color: var(--b3-muted); margin-right: 4px; }

.b3-swatches { display: flex; align-items: center; gap: 6px; }
.b3-run { display: flex; gap: 6px; transition: filter 0.25s ease; }

.b3-sw {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: var(--c);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), background 0.35s ease;
}
.b3-sw:hover { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18); }
.b3-sw:active { transform: scale(0.92); }
.b3-sw.copied { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--b3-ink); }

/* A group's line: hover it and the group stands out while the rest drains. */
.b3-gline {
    width: 11px;
    height: 30px;
    margin: 0 -3px;
    display: flex;
    justify-content: center;
    cursor: default;
    position: relative;
    flex: none;
}
.b3-gline::before {
    content: '';
    width: 2px;
    height: 26px;
    margin-top: 2px;
    border-radius: 1px;
    background: #d9d6cf;
    transition: background 0.2s ease;
}
.b3-gline:hover::before { background: #8a877f; }
.b3-swatches.lifting .b3-run { filter: saturate(0.35) opacity(0.75); }
.b3-swatches.lifting .b3-run.lifted { filter: none; }
.b3-run.lifted .b3-sw { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18); }

.b3-more, .b3-add {
    height: 30px;
    min-width: 30px;
    padding: 0 7px;
    border-radius: 7px;
    border: 1px solid var(--b3-line);
    background: #fff;
    font: 500 12px/1 inherit;
    font-family: inherit;
    color: var(--b3-text);
    cursor: pointer;
}
.b3-add { font-size: 17px; font-weight: 400; color: var(--b3-muted); }
.b3-more:hover, .b3-add:hover { background: var(--b3-hover); }
.b3-more[aria-expanded="true"] { background: var(--b3-ink); color: #fff; border-color: var(--b3-ink); }

.b3-sep { width: 1px; height: 22px; background: var(--b3-line); margin: 0 3px; flex: none; }

.b3-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 9px 0 8px;
    border: 1px solid var(--b3-line);
    border-radius: 8px;
    background: #fff;
    font: 500 13px inherit;
    font-family: inherit;
    color: var(--b3-ink);
    cursor: pointer;
}
.b3-chip:hover { background: var(--b3-hover); }
.b3-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14); flex: none; }
.b3-chip .b3-name { margin-left: 2px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.b3-chev { width: 10px; height: 10px; color: var(--b3-muted); }

.b3-ib {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--b3-line);
    background: #fff;
    color: var(--b3-text);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    flex: none;
    transition: background 0.15s ease, box-shadow 0.2s ease;
}
.b3-ib svg { width: 15px; height: 15px; }
.b3-ib:hover { background: var(--b3-hover); }
.b3-ib[aria-pressed="true"], .b3-ib[aria-expanded="true"] { background: #eef6f4; }
.b3-ib.on { background: #e6f4f1; color: var(--b3-teal); box-shadow: 0 0 0 2px var(--b3-teal); }
.b3-check.needs { color: var(--b3-amber); }
.b3-check.clear { color: var(--b3-green); }
.b3-lock.locked { color: var(--b3-ink); background: #f3f1ec; }

.b3-bar :focus-visible, .b3-panel :focus-visible { outline: 2px solid var(--b3-teal); outline-offset: 2px; }

/* Hover labels: the app's dark label, never the browser's white box. */
.b3-label-tip {
    position: absolute;
    z-index: 30;
    pointer-events: none;
    background: rgba(34, 34, 34, 0.95);
    color: #fff;
    font: 500 11px/1.2 'Inter', system-ui, sans-serif;
    padding: 5px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.b3-label-tip.show { opacity: 0.95; transform: none; }

/* Panels hang off the bar, like the app's. */
.b3-panel {
    position: absolute;
    z-index: 20;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.05);
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--b3-text);
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.18s ease, transform 0.22s var(--ease-out-expo);
    pointer-events: none;
    white-space: normal;
    text-wrap: pretty;
}
.b3-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.b3-panel h5 { margin: 0; font: 600 14px 'Inter', system-ui, sans-serif; color: var(--b3-ink); }
.b3-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.b3-panel-sub { font-size: 12px; color: var(--b3-muted); }

.b3-menu { padding: 6px; min-width: 210px; }
.b3-menu button {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: none;
    border-radius: 8px;
    font: 500 13px inherit;
    font-family: inherit;
    color: var(--b3-ink);
    cursor: pointer;
    text-align: left;
}
.b3-menu button:hover { background: var(--b3-hover); }
.b3-menu button[aria-checked="true"] { background: #eef6f4; }
.b3-menu .b3-menu-title { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--b3-muted); padding: 6px 10px 4px; }
.b3-menu .b3-menu-note { font-size: 12px; color: var(--b3-muted); padding: 6px 10px 4px; max-width: 220px; }
.b3-menu hr { border: 0; height: 1px; background: var(--b3-line); margin: 6px 4px; }
.b3-menu .b3-tick { margin-left: auto; color: var(--b3-teal); }

/* Check */
.b3-check-panel { width: max-content; min-width: 340px; max-width: min(480px, calc(100% - 16px)); }
.b3-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.b3-row + .b3-row { box-shadow: 0 -1px 0 var(--b3-line); }
.b3-pair { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-top: 1px; font-size: 11px; color: var(--b3-muted); }
.b3-pair i { width: 16px; height: 16px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14); display: block; }
.b3-row p { margin: 0; flex: 1; color: var(--b3-ink); }
.b3-row small { display: block; color: var(--b3-muted); font-size: 12px; margin-top: 2px; }
.b3-fix, .b3-undo {
    flex: none;
    border: 0;
    border-radius: 7px;
    padding: 5px 12px;
    font: 600 12px inherit;
    font-family: inherit;
    cursor: pointer;
}
.b3-fix { background: #2563eb; color: #fff; }
.b3-fix:hover { background: #1d4ed8; }
.b3-undo { background: var(--b3-hover); color: var(--b3-ink); }
.b3-undo:hover { background: #ecebe6; }
.b3-row.fixed p { color: var(--b3-text); }
.b3-row .b3-was { display: inline-flex; align-items: center; gap: 4px; }
.b3-clear { display: flex; align-items: center; gap: 8px; color: var(--b3-ink); padding: 4px 0 8px; }
.b3-clear svg { color: var(--b3-green); width: 18px; height: 18px; flex: none; }
.b3-details-link { display: block; margin-left: auto; margin-top: 6px; border: 0; background: none; color: #2563eb; font: 500 13px inherit; font-family: inherit; cursor: pointer; padding: 6px 0 0; }
.b3-details { margin-top: 8px; }
.b3-grid { border-collapse: separate; border-spacing: 3px; font-size: 11px; }
.b3-grid th { font-weight: 500; color: var(--b3-muted); text-align: left; padding: 0 4px; }
.b3-grid td { padding: 5px 6px; border-radius: 5px; text-align: center; font-variant-numeric: tabular-nums; min-width: 44px; }
.b3-grid td b { font-weight: 600; margin-right: 2px; }

/* Overflow: the colors past the sixth, under their group's name. */
.b3-overflow { width: 230px; }
.b3-overflow h6 { margin: 0 0 6px; font: 600 11px 'Inter', sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--b3-muted); }
.b3-overflow .b3-swatches { flex-wrap: wrap; }

/* The reopen tab after Minimize */
.b3-reopen {
    position: absolute;
    right: 0;
    top: 36px;
    z-index: 5;
    border: 0;
    border-radius: 10px 0 0 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
    padding: 12px 6px 12px 8px;
    color: var(--b3-text);
    cursor: pointer;
    display: none;
}
.b3-reopen.show { display: block; }
.b3-reopen svg { width: 14px; height: 14px; display: block; }

.b3-bar.minimized { opacity: 0; transform: translateX(-50%) scale(0.96) !important; pointer-events: none; }
.b3-bar { transition: opacity 0.2s ease; }

/* The copy-link toast carries the link itself */
.bb-toast a { color: #B8F2E6; font-weight: 600; margin-left: 6px; }

/* ===== Hero ===== */
.hero-demo-stage.v63 { max-width: 1010px; }
.v63 .bb-scene { padding-top: 78px; }
.v63 .bb-artboard { height: 330px; }
.v63 .b3-bar { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 4; cursor: default; }
.v63 .b3-bar.dragging { cursor: grabbing; }

/* ===== Feature demos ===== */
.feature-demo .b3-bar { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06); }
.b3-panel.b3-inline-panel { position: static; opacity: 1; transform: none; pointer-events: auto; }
.b3-inline-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
    padding: 14px 16px;
    margin-top: 12px;
    width: min(360px, 100%);
    font-size: 13px;
    line-height: 1.45;
    text-wrap: pretty;
}
.b3-lens-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.b3-lens-choices button {
    border: 1px solid var(--b3-line);
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font: 500 12px 'Inter', system-ui, sans-serif;
    color: var(--b3-ink);
    cursor: pointer;
}
.b3-lens-choices button:hover { background: var(--b3-hover); }
.b3-lens-choices button[aria-pressed="true"] { background: var(--b3-ink); color: #fff; border-color: var(--b3-ink); }
.b3-demo-reset { margin-top: 10px; border: 0; background: none; color: var(--b3-muted); font: 500 12px 'Inter', sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Platform shots, drawn around the real bars ===== */
.shot {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    background: #f4f2ee;
    margin-bottom: 1.25rem;
}
.shot img.bar { position: absolute; left: 7%; width: 190%; max-width: none; height: auto; filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.18)); }
.shot-chrome .top { height: 12%; background: #dee1e6; display: flex; align-items: center; gap: 4px; padding-left: 5%; }
.shot-chrome .top i { width: 6px; height: 6px; border-radius: 50%; background: #c4c7cc; }
.shot-chrome .canvas { position: absolute; inset: 12% 0 0; background: #eceef2; }
.shot-chrome .doc { position: absolute; left: 22%; right: 22%; top: 30%; bottom: 0; background: #fff; box-shadow: 0 0 0 1px #e2e4e8; }
.shot-chrome .doc i { display: block; height: 5px; margin: 10% 12% 0; border-radius: 3px; background: #e6e8ec; }
.shot-chrome .doc i + i { margin-top: 5%; width: 60%; }
.shot-chrome img.bar { top: 18%; }
.shot-mac { background: linear-gradient(160deg, #cfe3dc, #f1dccf 60%, #e9d4dc); }
.shot-mac .menubar { height: 7%; background: rgba(255,255,255,0.55); backdrop-filter: blur(6px); }
.shot-mac .win { position: absolute; left: 8%; right: 8%; top: 42%; bottom: -4%; background: #fff; border-radius: 8px 8px 0 0; box-shadow: 0 10px 30px rgba(15,23,42,0.18); }
.shot-mac .win::before { content: ''; position: absolute; left: 12px; top: 10px; width: 36px; height: 8px; background: radial-gradient(circle at 4px 4px, #ff5f57 3.5px, transparent 4px), radial-gradient(circle at 18px 4px, #febc2e 3.5px, transparent 4px), radial-gradient(circle at 32px 4px, #28c840 3.5px, transparent 4px); }
.shot-mac img.bar { top: 16%; width: 175%; }
.shot-win { background: linear-gradient(160deg, #1f3b5a, #2f5d7c 55%, #6b8fa8); }
.shot-win .taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: rgba(243, 243, 243, 0.85); display: flex; justify-content: center; align-items: center; gap: 6px; }
.shot-win .taskbar i { width: 12px; height: 12px; border-radius: 3px; background: #9aa6b2; }
.shot-win .win { position: absolute; left: 6%; right: 6%; top: 8%; bottom: 16%; background: #fff; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.shot-win img.bar { top: 19%; }

@media (max-width: 760px) {
    .v63 .b3-label, .v63 .b3-grip, .v63 .b3-lock, .v63 .b3-groups, .v63 .b3-eyedrop, .v63 .b3-save, .v63 .b3-sep.hide-sm, .v63 .b3-more { display: none; }
    .v63 .b3-run ~ .b3-run, .v63 .b3-gline, .v63 .b3-min { display: none; }
    .v63 .b3-bar { gap: 5px; padding: 7px 8px; }
    .v63 .bb-scene { padding: 76px 12px 0; }
    .b3-check-panel { width: min(320px, calc(100vw - 48px)); }
    .feature-demo .b3-label, .feature-demo .b3-grip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .b3-sw, .b3-run, .b3-panel, .b3-label-tip, .b3-bar { transition: none; }
}

.feature-demo.b3 { position: relative; display: flex; flex-direction: column; align-items: center; }
.feature-demo.b3 .b3-mount { display: flex; justify-content: center; }
.v63 .hero-demo-caption { text-wrap: balance; }

.demo-hint { text-wrap: balance; }

/* Phones: the hero keeps swatches, the chip's colors, Check, the eye, Share
   and Minimize; the demo bars are drawn a little smaller so they fit. */
@media (max-width: 760px) {
    .v63 .b3-add, .v63 .b3-chip .b3-name { display: none; }
    .v63 .b3-bar { max-width: calc(100% - 12px); }
    .feature-demo.b3 { min-width: 0; max-width: 100%; overflow: visible; }
    .feature-demo .b3-bar { zoom: 0.8; }
    .feature-demo .b3-chip .b3-name { max-width: 90px; }
}

.source-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(15,23,42,.35); text-underline-offset: 3px; }
.source-link:hover { text-decoration-color: currentColor; }
