/* Compare mode (chat) — additive styles, uses dashcore variables for light/dark. */

/* Footer toggle: compact icon button next to the model selector */
.compare-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 20px;
    border: 1px solid var(--dc-border-color, rgba(255, 255, 255, .12));
    background: var(--dc-card-bg, transparent);
    color: var(--dc-body-color, inherit);
    font-size: 14px;
    cursor: pointer;
    transition: 180ms ease;
}

.compare-toggle:hover {
    border-color: var(--dc-primary, #7c3aed);
}

.compare-toggle.active {
    background: linear-gradient(135deg, rgba(85, 51, 255, .25), rgba(124, 58, 237, .18));
    border-color: var(--dc-primary, #7c3aed);
    color: var(--dc-body-color, #fff);
}

/* Rendered pairs */
.compare-pairs {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.compare-question {
    max-width: 860px;
    margin: 0 auto 12px;
}

.compare-pending {
    max-width: 860px;
    margin: 0 auto;
}

.compare-branches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto;
}

.compare-branch {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--dc-border-color, rgba(255, 255, 255, .1));
    border-radius: 14px;
    background: var(--dc-card-bg, rgba(255, 255, 255, .03));
    overflow: hidden;
    min-width: 0;
}

.compare-branch-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--dc-border-color, rgba(255, 255, 255, .08));
}

.compare-branch-model {
    font-weight: 600;
    font-size: 14px;
    margin-right: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.compare-badge.faster {
    color: #6ee7b7;
    background: rgba(110, 231, 183, .12);
    border: 1px solid rgba(110, 231, 183, .35);
}

.compare-badge.cheaper {
    color: #7dd3fc;
    background: rgba(125, 211, 252, .12);
    border: 1px solid rgba(125, 211, 252, .35);
}

.compare-branch-body {
    padding: 14px;
    font-size: 14.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.compare-branch.is-error .compare-branch-body {
    opacity: .75;
}

.compare-branch-error {
    color: #fca5a5;
    font-size: 13.5px;
}

.compare-branch-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding: 10px 14px;
    border-top: 1px solid var(--dc-border-color, rgba(255, 255, 255, .08));
}

.compare-metric {
    font-size: 12.5px;
    opacity: .85;
    white-space: nowrap;
}

.compare-continue-btn {
    margin-left: auto;
    height: 30px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 15px;
    border: 1px solid var(--dc-primary, #7c3aed);
    background: rgba(124, 58, 237, .12);
    color: var(--dc-body-color, inherit);
    cursor: pointer;
    white-space: nowrap;
    transition: 180ms ease;
}

.compare-continue-btn:hover {
    background: rgba(124, 58, 237, .28);
}

.compare-history-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 7px;
    border-radius: 9px;
    color: #c4b5fd;
    background: rgba(124, 58, 237, .16);
    border: 1px solid rgba(124, 58, 237, .35);
}

/* Composer notice shown while compare mode is on */
.compare-enabled-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 12.5px;
    opacity: .75;
    color: var(--dc-body-color, inherit);
}

.compare-enabled-notice::before {
    content: "\f24e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: var(--dc-primary, #7c3aed);
}

@media (max-width: 767px) {
    .compare-branches {
        grid-template-columns: 1fr;
    }

    .compare-continue-btn {
        margin-left: 0;
        width: 100%;
    }
}
