.gutter-container {
    position: relative;
    width: 280px;
    flex-shrink: 0;
    align-self: stretch;
}

.side-card {
    padding: 10px 12px;
    border-radius: 10px;
    opacity: 1;
    transition: opacity 0.3s, box-shadow 0.3s, transform 0.3s;
}

.side-card:hover {
    outline: 1px solid var(--surface-border-placeholder);
}

.side-card.focused {
    /* outline: 1px solid var(--surface-border-placeholder); */
    opacity: 1;
}

.side-card.active {
    background: white;
    box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.07), 0 0 1px 0 rgba(0, 0, 0, 0.45);
    outline: none;
    opacity: 1;
    transform: translateX(-8px);
}

.side-card.out-of-focus {
    opacity: 0.5;
}

/* Hidden cards for other sections when a section is focused   */
.side-card.hidden {
    opacity: 0;
    transform: scale(0.95);
}

/* collapsed = off-screen start state for the expand animation,
   and end state for the collapse animation.
   Must be declared last so it wins specificity ties. */
.side-card.collapsed {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}


.side-card-indicator {
    width: 100%;
}

/* ─── Gutter chat card ───────────────────────────────────────────────── */

/* Always full opacity — it's the active interaction surface */
.side-card[data-card-type="chat"] {
    opacity: 1;
    cursor: default;
}

/* Constrain the message area so the card doesn't grow unbounded */
.side-card[data-card-type="chat"] .chat-content {
    max-height: 200px;
}

/* ─── Card structure ─────────────────────────────────────────────────── */

.side-card-top {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 0 2px;
    width: 100%;
}

.side-card-lh {
    padding: 2px 0 6px;
    flex-shrink: 0;
}

.side-card-rh {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    letter-spacing: 0.15px;
}

.side-card-info {
    display: flex;
    gap: 4px;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    font-size: 12px;
    line-height: 20px;
    color: var(--surface-text-sub);
}

.card-label {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-time {
    opacity: 0.5;
    flex-shrink: 0;
}

.card-body {
    font-size: 14px;
    line-height: 22px;
    color: var(--surface-text-main);
    overflow: hidden;
    margin: 0;
}

.card-action {
    font-size: 12px;
    line-height: 20px;
    color: var(--surface-text-placeholder);
    cursor: pointer;
    margin: 0;
}

.card-reasoning {
    display: none;
    font-size: 12px;
    line-height: 18px;
    color: var(--surface-text-sub);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #0000000a;
}

.card-reasoning p  { margin: 0 0 4px; }
.card-reasoning ul { margin: 0; padding-left: 14px; }
.card-reasoning li { margin-bottom: 2px; }

.side-card.active .card-reasoning {
    display: block;
}

/* ─── Card actions (revealed when .active) ───────────────────────────── */

.card-actions {
    display: none;
    align-items: center;
    width: 100%;
    padding-top: 8px;
    gap: 0;
}

.side-card.active .card-actions {
    display: flex;
}

.card-actions-btn {
    flex: 1;
    justify-content: center;
}

.card-actions-divider {
    width: 1px;
    align-self: stretch;
    background-color: #0000000a;
    flex-shrink: 0;
    margin-block: 4px;
    margin-inline: 1px;
    transition: opacity 0.1s ease;
}

.card-actions-btn:hover + .card-actions-divider,
.card-actions-divider:has(+ .card-actions-btn:hover) {
    opacity: 0;
}

/* Comment avatar — iris/purple circle */
.avatar.avatar--comment {
    background: #652d99;
    color: #fff;
    border-radius: 50%;
}
