/* civnode-nodes.css
   Styles for civnode_pill, civnode_card, and civnode_quote ProseMirror nodes.
   All colors via theme variables — no hardcoded hex. */

/* ── Pill (inline link) ──────────────────────────────────────────────────── */

.cn-pill {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--text-primary);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    transition: background 0.12s ease;
    vertical-align: baseline;
    line-height: 1.6;
}

.cn-pill:hover {
    background: color-mix(in srgb, var(--accent) 28%, transparent);
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ── Card (block transclude) ─────────────────────────────────────────────── */

.cn-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    margin: 8px 0;
    border-radius: 8px;
    background: var(--surface-2, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 6%, transparent);
    cursor: default;
    user-select: none;
}

.cn-card-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: color-mix(in srgb, var(--accent) 12%, transparent);
}

.cn-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cn-card-name {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cn-card-desc {
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Quote (block transclude of prose) ──────────────────────────────────── */

.cn-quote {
    border-left: 3px solid var(--accent);
    padding: 10px 16px;
    margin: 10px 0;
    background: color-mix(in srgb, var(--accent) 6%, transparent);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--text-primary);
}

.cn-quote p {
    margin: 0 0 6px;
}

.cn-quote p:last-child {
    margin-bottom: 0;
}

.cn-quote-source {
    display: block;
    font-style: normal;
    font-size: 0.82em;
    color: var(--text-secondary);
    margin-top: 6px;
}

.cn-quote-source::before {
    content: '\2014\00a0';
}

/* ── Paste-options chip ──────────────────────────────────────────────────── */

.paste-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--ink) 12%, transparent);
    font-size: 0.82em;
    pointer-events: all;
}

.paste-chip-label {
    color: var(--text-secondary);
}

.paste-chip-alt {
    border: none;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.9em;
    cursor: pointer;
    font-weight: 500;
}

.paste-chip-alt:hover {
    background: color-mix(in srgb, var(--accent) 32%, transparent);
}
