/* ========================================
   Review-bot demo: an illustrative, generic AI review bot
   filling a pull request thread. Fixed 720px-wide tall page;
   scripts/bot-demo.js drives the camera and the arrival of comments.
   ======================================== */

.pb {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #eef1f4;
    font-family: -apple-system, 'Segoe UI', 'Noto Sans', Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    pointer-events: none;
    contain: strict;
}

.pb-cam {
    position: absolute;
    left: 0;
    top: 0;
    width: 720px;
    transform-origin: 0 0;
    background: #fff;
    color: #1f2328;
    font-size: 9px;
    line-height: 1.5;
    transition: opacity 0.4s ease;
}

/* ---------- Header ---------- */

.pb-head {
    position: relative;
    height: 112px;
    padding: 14px 22px 0;
    border-bottom: 1px solid #d8dee4;
    background: #fff;
}

.pb-title {
    margin: 0 0 5px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.pb-title span {
    font-weight: 300;
    color: #656d76;
}

.pb-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: #656d76;
}

.pb-open {
    padding: 2px 9px;
    border-radius: 99px;
    background: #1f883d;
    color: #fff;
    font-weight: 600;
}

.pb-meta code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #ddf4ff;
    color: #0969da;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
}

.pb-tabs {
    position: absolute;
    left: 22px;
    bottom: 0;
    display: flex;
    gap: 16px;
    font-size: 9.5px;
    color: #424a53;
}

.pb-tabs span {
    padding: 8px 2px 9px;
    border-bottom: 2px solid transparent;
}

.pb-tabs .is-on {
    font-weight: 600;
    border-bottom-color: #fd8c73;
}

.pb-count {
    display: inline-block;
    min-width: 14px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 99px;
    background: #d0d7de;
    text-align: center;
    font-size: 8px;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease;
}

.pb.is-busy .pb-count {
    background: #cf222e;
    color: #fff;
}

.pb-side {
    position: absolute;
    left: 480px;
    top: 118px;
    width: 218px;
    font-size: 8.5px;
    color: #656d76;
}

.pb-side div {
    padding: 8px 0;
    border-bottom: 1px solid #d8dee4;
}

.pb-side b {
    display: block;
    margin-bottom: 3px;
    font-size: 9px;
    color: #1f2328;
}

.pb-side i {
    font-style: normal;
}

.pb-chip {
    display: inline-block;
    padding: 0 6px;
    border-radius: 99px;
    background: #ffebe9;
    color: #cf222e;
    font-weight: 600;
    font-size: 8px;
}

/* ---------- Timeline ---------- */

.pb-tl {
    position: relative;
    margin: 0 0 0 22px;
    width: 428px;
    padding: 14px 0 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pb-tl::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d8dee4;
}

.pb-item {
    position: relative;
}

.pb-av {
    position: absolute;
    left: -28px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6e7781;
    border: 2px solid #fff;
    box-sizing: content-box;
    margin: -2px;
}

.pb-av.is-bot {
    background: #f0883e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.pb-av.is-bot svg {
    width: 12px;
    height: 12px;
    fill: #fff;
}

.pb-av.is-me {
    background: radial-gradient(circle at 50% 38%, #f3d6c8 0 20%, #7a5cc2 21% 100%);
}

.pb-card {
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.pb-ch {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
    font-size: 8.5px;
    color: #656d76;
}

.pb-ch b {
    color: #1f2328;
    font-weight: 600;
}

.pb-tag {
    padding: 0 5px;
    border: 1px solid #d0d7de;
    border-radius: 99px;
    font-size: 7.5px;
    color: #656d76;
}

.pb-cb {
    padding: 9px 12px 10px;
    font-size: 9px;
    line-height: 1.55;
    color: #1f2328;
}

.pb-cb h3 {
    margin: 0 0 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid #d8dee4;
    font-size: 12px;
    font-weight: 600;
}

.pb-cb h4 {
    margin: 8px 0 3px;
    font-size: 10px;
    font-weight: 600;
}

.pb-cb p {
    margin: 0 0 5px;
}

.pb-cb ul {
    margin: 0 0 4px;
    padding-left: 13px;
}

.pb-cb code {
    padding: 0 3px;
    border-radius: 3px;
    background: #eff1f3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
}

.pb-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pb-spin {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.6px solid #d0d7de;
    border-top-color: #0969da;
    animation: pb-spin 0.8s linear infinite;
}

@keyframes pb-spin {
    to {
        transform: rotate(360deg);
    }
}

.pb-tbl {
    width: 100%;
    margin: 3px 0 4px;
    border-collapse: collapse;
    font-size: 8px;
}

.pb-tbl th,
.pb-tbl td {
    padding: 3px 6px;
    border: 1px solid #d0d7de;
    text-align: left;
    vertical-align: top;
}

.pb-tbl th {
    background: #f6f8fa;
    font-weight: 600;
}

.pb-tbl tr:nth-child(even) td {
    background: #f6f8fa;
}

.pb-diag {
    display: block;
    width: 100%;
    height: auto;
    margin: 4px 0 2px;
}

.pb-effort {
    padding: 5px 8px;
    margin: 3px 0 5px;
    border-left: 3px solid #d0d7de;
    color: #656d76;
    font-style: italic;
}

.pb-diff {
    margin: 0 0 6px;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    overflow: hidden;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 7.6px;
    line-height: 1.55;
}

.pb-diff > div {
    padding: 1px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pb-diff .is-file {
    background: #f6f8fa;
    color: #656d76;
    border-bottom: 1px solid #d0d7de;
    font-family: inherit;
}

.pb-diff .is-add {
    background: #dafbe1;
    color: #116329;
}

.pb-diff .is-del {
    background: #ffebe9;
    color: #82071e;
}

.pb-sev {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    border-radius: 99px;
    font-size: 8px;
    font-weight: 600;
}

.pb-sev.is-crit {
    background: #ffebe9;
    color: #cf222e;
}

.pb-sev.is-minor {
    background: #fff8c5;
    color: #7d4e00;
}

.pb-sev.is-nit {
    background: #ddf4ff;
    color: #0550ae;
}

.pb-btns {
    display: flex;
    gap: 5px;
    margin: 5px 0 2px;
}

.pb-btn {
    padding: 2px 8px;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    background: #f6f8fa;
    font-size: 8px;
    font-weight: 600;
    color: #1f2328;
}

.pb-btn.is-dim {
    color: #8c959f;
}

.pb-fold {
    margin-top: 3px;
    font-weight: 600;
    color: #424a53;
}

.pb-react {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.pb-react span {
    padding: 0 6px;
    border: 1px solid #d0d7de;
    border-radius: 99px;
    background: #f6f8fa;
    font-size: 8px;
}

.pb-reply {
    margin-top: 6px;
    padding: 4px 8px;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    color: #8c959f;
    font-size: 8.5px;
}

.pb-resolve {
    margin-top: 5px;
    padding: 2px 8px;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 600;
    display: inline-block;
}

/* comments arrive one after another */
.pb-slot {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: -5px 0;
    transform: translateY(8px);
    transition: max-height 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.45s ease, transform 0.55s ease, margin 0.9s ease;
}

.pb-slot.is-in {
    max-height: 640px;
    opacity: 1;
    margin: 0;
    transform: none;
}

.pb-slot .pb-card {
    box-shadow: 0 0 0 0 rgba(240, 136, 62, 0);
    transition: box-shadow 1.4s ease 0.4s;
}

.pb-slot.is-in .pb-card {
    box-shadow: 0 0 0 2px rgba(240, 136, 62, 0.4), 0 0 18px rgba(240, 136, 62, 0.22);
}

.pb-slot.is-old .pb-card {
    box-shadow: none;
}

.pb.is-reset .pb-slot,
.pb.is-reset .pb-slot .pb-card {
    transition: none;
}

.pb-status-card.is-done .pb-spin {
    animation: none;
    border-color: #1f883d;
}

@media (prefers-reduced-motion: reduce) {
    .pb-slot,
    .pb-slot .pb-card {
        transition: none;
    }

    .pb-spin {
        animation: none;
    }
}
