Raiju/css/ai-copilot.css
2026-10-25 06:05:42 +03:00

2049 lines
50 KiB
CSS

.rj-copilot {
position: fixed;
right: 20px;
bottom: 20px;
z-index: 100050;
font-family: var(--rj-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
color: var(--rj-text, #172033);
}
.rj-copilot * {
box-sizing: border-box;
}
.rj-copilot select {
width: 100%;
min-height: 34px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
padding: 7px 40px 7px 14px; /* fixed: the caret sits at right 14px */
appearance: none;
background-color: var(--rj-text-on-primary, #fff);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 14px center;
background-size: 18px 18px;
color: var(--rj-text, #172033);
font: inherit;
font-size: 13px;
line-height: 1.35;
}
.rj-copilot select:focus,
.rj-copilot-content-fields input:focus,
.rj-copilot-content-fields textarea:focus {
outline: none;
border-color: var(--editor-primary-light, var(--rj-brand, var(--editor-primary, var(--rj-primary, #2563eb))));
box-shadow: 0 0 0 3px color-mix(in srgb, var(--editor-primary-light, var(--rj-brand, var(--editor-primary, var(--rj-primary, #2563eb)))) 28%, transparent);
}
body.visual-editing .rj-copilot-selected-field {
outline: 2px solid var(--editor-primary, var(--rj-primary, #2563eb)) !important;
outline-offset: 3px !important;
box-shadow: 0 0 0 5px color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 16%, transparent) !important;
}
body:not(.visual-editing) .rj-copilot-selected-field {
outline: none !important;
box-shadow: none !important;
}
.rj-copilot-toggle {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--rj-space-1-5, 6px);
width: 58px;
height: 58px;
border: 0;
border-radius: 50%;
background: var(--editor-primary, var(--rj-primary, #2563eb));
color: var(--rj-text-on-primary, #fff);
box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
cursor: pointer;
}
.rj-copilot-toggle {
--rj-hover-from: var(--editor-primary, var(--rj-primary, #2563eb));
--rj-hover-peak: var(--rj-hover-lift, var(--editor-primary-hover, var(--rj-primary-hover, #1d4ed8)));
--rj-hover-to: var(--rj-hover-settle, var(--editor-primary-hover, var(--rj-primary-hover, #1d4ed8)));
transition: background-color var(--rj-duration-hover-out, 320ms) ease-out;
}
.rj-copilot-toggle:hover {
background: var(--rj-hover-settle, var(--editor-primary-hover, var(--rj-primary-hover, #1d4ed8)));
animation: rj-hover-fill var(--rj-duration-hover-in, 1400ms) linear both;
}
.rj-copilot-toggle:focus-visible {
background: var(--rj-hover-settle, var(--editor-primary-hover, var(--rj-primary-hover, #1d4ed8)));
outline: 2px solid var(--rj-border-focus, var(--rj-primary, #2563eb));
outline-offset: 3px;
}
@keyframes rj-hover-fill {
0% { background-color: var(--rj-hover-from); }
36% { background-color: var(--rj-hover-peak); }
62% { background-color: var(--rj-hover-peak); }
100% { background-color: var(--rj-hover-to); }
}
.rj-copilot-toggle svg {
width: 34px;
height: 31px;
fill: currentColor;
}
.rj-copilot-toggle__label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0;
}
.rj-copilot-panel {
position: absolute;
right: 0;
bottom: 72px;
display: flex;
flex-direction: column;
width: min(380px, calc(100vw - 32px));
height: min(560px, calc(100vh - 112px));
border: 1px solid rgba(148, 163, 184, 0.35);
border-radius: var(--rj-radius-xl, 12px);
background: var(--rj-bg-elevated, #fff);
box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
overflow: hidden;
}
.rj-copilot.is-maximized .rj-copilot-panel {
width: min(520px, calc(100vw - 24px));
height: calc(100vh - 24px);
bottom: -8px;
}
.rj-copilot-panel[hidden] {
display: none;
}
.rj-copilot-header {
display: grid;
gap: var(--rj-space-2-5, 10px);
padding: var(--rj-space-3-5, 14px) var(--rj-space-4, 16px);
border-bottom: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-header__top {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-3-5, 14px);
}
.rj-copilot-header strong {
display: block;
font-size: 15px;
line-height: 1.25;
}
.rj-copilot-header__actions {
display: inline-flex;
flex-wrap: wrap;
gap: var(--rj-space-2, 8px);
}
.rj-copilot-close,
.rj-copilot-maximize,
.rj-copilot-history-btn,
.rj-copilot-new-btn,
.rj-copilot-delete-btn {
width: 32px;
height: 32px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
cursor: pointer;
line-height: 0;
}
.rj-copilot-maximize {
display: grid;
place-items: center;
}
.rj-copilot-close,
.rj-copilot-history-btn,
.rj-copilot-new-btn,
.rj-copilot-delete-btn {
display: grid;
place-items: center;
padding: 0;
}
.rj-copilot-close svg,
.rj-copilot-maximize svg,
.rj-copilot-history-btn svg,
.rj-copilot-new-btn svg,
.rj-copilot-delete-btn svg {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
stroke-linecap: round;
stroke-linejoin: round;
}
.rj-copilot-close:hover,
.rj-copilot-close:focus-visible,
.rj-copilot-maximize:hover,
.rj-copilot-maximize:focus-visible,
.rj-copilot-history-btn:hover,
.rj-copilot-history-btn:focus-visible,
.rj-copilot-new-btn:hover,
.rj-copilot-new-btn:focus-visible,
.rj-copilot-delete-btn:hover,
.rj-copilot-delete-btn:focus-visible {
background: var(--rj-bg-sunken, #f1f5f9);
}
.rj-copilot-messages {
flex: 1;
min-height: 0;
padding: var(--rj-space-3-5, 14px);
overflow: auto;
background: var(--rj-bg-elevated, #fff);
}
.rj-copilot-context,
.rj-copilot-status {
margin-bottom: var(--rj-space-3, 12px);
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-sunken, #f1f5f9);
color: var(--rj-text-secondary, #334155);
font-size: 12px;
line-height: 1.4;
}
.rj-copilot-context strong,
.rj-copilot-context span {
display: block;
}
.rj-copilot-context span {
margin-top: 3px;
color: var(--rj-text-muted, #64748b);
}
.rj-copilot-context__selected {
color: var(--editor-primary, var(--rj-primary, #2563eb)) !important;
font-weight: 700;
}
.rj-copilot-msg {
display: flex;
margin-bottom: var(--rj-space-2-5, 10px);
}
.rj-copilot-msg--user {
justify-content: flex-end;
}
.rj-copilot-msg__bubble {
max-width: 86%;
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-sunken, #f1f5f9);
color: var(--rj-text, #172033);
font-size: 13px;
line-height: 1.45;
overflow-wrap: anywhere;
}
.rj-copilot-msg--user .rj-copilot-msg__bubble {
background: var(--rj-primary, var(--rj-text, #172033));
color: var(--rj-text-on-primary, #fff);
}
.rj-copilot-msg__bubble--loading {
display: inline-flex;
align-items: center;
gap: var(--rj-space-2, 8px);
}
.rj-copilot-spinner {
width: 14px;
height: 14px;
flex: 0 0 auto;
border: 2px solid var(--rj-border-strong, #cbd5e1);
border-top-color: var(--editor-primary, var(--rj-primary, #2563eb));
border-radius: 50%;
animation: rj-copilot-spin 0.8s linear infinite;
}
@keyframes rj-copilot-spin {
to {
transform: rotate(360deg);
}
}
.rj-copilot-proposals {
display: grid;
gap: var(--rj-space-2-5, 10px);
margin: var(--rj-space-3, 12px) 0;
}
.rj-copilot-proposal-summary {
border: 1px solid color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 30%, var(--rj-border-strong, #cbd5e1));
border-radius: var(--rj-radius-lg, 8px);
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 8%, #fff);
overflow: hidden;
}
.rj-copilot-proposal-summary header,
.rj-copilot-proposal-summary footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2-5, 10px);
padding: var(--rj-space-2-5, 10px);
}
.rj-copilot-proposal-summary header strong {
color: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 70%, var(--rj-text, #0f172a));
font-size: 13px;
}
.rj-copilot-proposal-summary header span {
color: var(--rj-text-secondary, #475569);
font-size: 11px;
}
.rj-copilot-proposal-summary ul {
display: grid;
gap: var(--rj-space-1-5, 6px);
margin: 0;
padding: 0 var(--rj-space-2-5, 10px) var(--rj-space-2-5, 10px) var(--rj-space-6, 24px);
color: var(--rj-text, #172033);
font-size: 12px;
}
.rj-copilot-proposal-summary li strong {
display: block;
color: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 76%, var(--rj-text, #0f172a));
}
.rj-copilot-proposal-summary li span {
color: var(--rj-text-secondary, #475569);
}
.rj-copilot-create,
.rj-copilot-created,
.rj-copilot-image-result,
.rj-copilot-image-options {
margin: var(--rj-space-3, 12px) 0;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
overflow: hidden;
}
.rj-copilot-create header,
.rj-copilot-created header,
.rj-copilot-image-options header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2-5, 10px);
padding: 9px var(--rj-space-2-5, 10px);
border-bottom: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-create header strong,
.rj-copilot-created header strong,
.rj-copilot-image-options header strong {
color: var(--rj-text, #0f172a);
font-size: 12px;
}
.rj-copilot-create header span,
.rj-copilot-created header span,
.rj-copilot-image-options header span {
color: var(--rj-text-muted, #64748b);
font-size: 11px;
}
.rj-copilot-create__fields {
display: grid;
gap: 1px;
background: var(--rj-border, #e2e8f0);
}
.rj-copilot-create__fields div {
padding: var(--rj-space-2, 8px) var(--rj-space-2-5, 10px);
background: var(--rj-bg-elevated, #fff);
}
.rj-copilot-create__fields span {
display: block;
margin-bottom: 3px;
color: var(--rj-text-muted, #64748b);
font-size: 11px;
font-weight: 700;
}
.rj-copilot-create__fields p,
.rj-copilot-create__missing {
margin: 0;
color: var(--rj-text, #172033);
font-size: 12px;
line-height: 1.4;
overflow-wrap: anywhere;
}
.rj-copilot-create__missing {
padding: 9px var(--rj-space-2-5, 10px);
border-top: 1px solid var(--rj-border, #e2e8f0);
color: var(--rj-brand, #b45309);
}
.rj-copilot-created p {
margin: 0;
padding: var(--rj-space-2-5, 10px);
color: var(--rj-text, #172033);
font-size: 12px;
overflow-wrap: anywhere;
}
.rj-copilot-create footer,
.rj-copilot-created footer,
.rj-copilot-image-options footer {
display: flex;
gap: var(--rj-space-2, 8px);
justify-content: flex-end;
padding: var(--rj-space-2, 8px) var(--rj-space-2-5, 10px);
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
color: var(--rj-text-muted, #64748b);
font-size: 11px;
}
.rj-copilot-created footer a {
color: var(--rj-primary, #2563eb);
font-weight: 700;
text-decoration: none;
}
.rj-copilot-image-fields {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
gap: var(--rj-space-2, 8px);
padding: var(--rj-space-2-5, 10px);
}
.rj-copilot-image-field {
display: grid;
gap: var(--rj-space-1-5, 6px);
min-width: 0;
border: 2px solid transparent;
border-radius: var(--rj-radius-lg, 8px);
padding: var(--rj-space-1-5, 6px);
background: var(--rj-bg, #f8fafc);
color: var(--rj-text, #172033);
cursor: pointer;
text-align: left;
}
.rj-copilot-image-field.is-active {
border-color: var(--editor-primary, var(--rj-primary, #2563eb));
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 8%, #fff);
}
.rj-copilot-image-field img,
.rj-copilot-image-field > span {
display: block;
width: 100%;
aspect-ratio: 4 / 3;
border-radius: var(--rj-radius-md, 6px);
background: var(--rj-border, #e2e8f0);
object-fit: cover;
}
.rj-copilot-image-field > span {
display: grid;
place-items: center;
padding: var(--rj-space-1-5, 6px);
color: var(--rj-text-muted, #64748b);
font-size: 11px;
line-height: 1.25;
text-align: center;
}
.rj-copilot-image-field strong {
min-width: 0;
font-size: 11px;
line-height: 1.25;
overflow-wrap: anywhere;
}
.rj-copilot-image-mode-group {
display: grid;
gap: 5px;
padding: 0 var(--rj-space-2-5, 10px) var(--rj-space-2-5, 10px);
}
.rj-copilot-image-mode-group > span {
color: var(--rj-text-secondary, #475569);
font-size: 11px;
font-weight: 700;
}
.rj-copilot-image-modes {
display: flex;
align-items: center;
gap: 3px;
max-width: 420px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: 999px;
padding: var(--rj-space-1, 4px);
background: var(--rj-bg-sunken, #eef3fb);
}
.rj-copilot-image-prompt {
display: grid;
gap: 5px;
padding: 0 var(--rj-space-2-5, 10px) var(--rj-space-2-5, 10px);
color: var(--rj-text-secondary, #475569);
font-size: 11px;
font-weight: 700;
}
.rj-copilot-image-prompt textarea {
width: 100%;
min-height: 72px;
max-height: 140px;
resize: vertical;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
padding: 9px var(--rj-space-2-5, 10px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text, #172033);
font: inherit;
font-size: 12px;
line-height: 1.35;
}
.rj-copilot-image-prompt textarea:focus {
outline: 2px solid color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 30%, transparent);
outline-offset: 1px;
border-color: var(--editor-primary, var(--rj-primary, #2563eb));
}
.rj-copilot-image-mode {
flex: 1 1 0;
min-height: 34px;
border: 0;
border-radius: 999px;
padding: 0 var(--rj-space-3-5, 14px);
background: transparent;
color: var(--rj-text-secondary, #334155);
cursor: pointer;
font-size: 12px;
font-weight: 700;
white-space: nowrap;
transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.rj-copilot-image-mode.is-active {
background: var(--editor-primary, var(--rj-primary, #2563eb));
color: var(--rj-text-on-primary, #fff);
box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}
.rj-copilot-created footer a:hover,
.rj-copilot-created footer a:focus-visible {
text-decoration: underline;
}
.rj-copilot-image-result {
display: grid;
grid-template-columns: 68px 1fr;
gap: var(--rj-space-2-5, 10px);
padding: var(--rj-space-2-5, 10px);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-image-result img {
width: 68px;
height: 68px;
border-radius: var(--rj-radius-lg, 8px);
object-fit: cover;
background: var(--rj-border, #e2e8f0);
}
.rj-copilot-image-result div {
min-width: 0;
display: grid;
align-content: center;
gap: 3px;
}
.rj-copilot-image-result strong {
color: var(--rj-text, #0f172a);
font-size: 12px;
}
.rj-copilot-image-result span {
color: var(--rj-text-secondary, #475569);
font-size: 11px;
line-height: 1.35;
overflow-wrap: anywhere;
}
.rj-copilot-publish-btn {
flex: 0 0 auto;
min-height: 30px;
border: 0;
border-radius: var(--editor-btn-radius, 7px);
padding: 0 var(--rj-space-2-5, 10px);
background: var(--editor-btn-bg, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #4580ed) 0%, var(--rj-primary, #2563eb) 70%));
color: var(--rj-text-on-primary, #fff);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-publish-btn:hover,
.rj-copilot-publish-btn:focus-visible {
background: var(--editor-btn-bg-hover, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #5d94ef) 0%, var(--rj-primary, #2563eb) 70%));
}
.rj-copilot-undo {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2-5, 10px);
margin: var(--rj-space-3, 12px) 0;
padding: var(--rj-space-2-5, 10px);
border: 1px solid color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 30%, var(--rj-border-strong, #cbd5e1));
border-radius: var(--rj-radius-lg, 8px);
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 8%, #fff);
}
.rj-copilot-undo div {
min-width: 0;
display: grid;
gap: var(--rj-space-0-5, 2px);
}
.rj-copilot-undo strong {
color: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 70%, var(--rj-text, #0f172a));
font-size: 12px;
}
.rj-copilot-undo span {
color: var(--rj-text-secondary, #475569);
font-size: 11px;
overflow-wrap: anywhere;
}
.rj-copilot-undo-btn {
flex: 0 0 auto;
min-height: 30px;
border: 0;
border-radius: var(--editor-btn-radius, 7px);
padding: 0 var(--rj-space-2-5, 10px);
background: var(--editor-btn-bg, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #4580ed) 0%, var(--rj-primary, #2563eb) 70%));
color: var(--rj-text-on-primary, #fff);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-undo-btn:hover,
.rj-copilot-undo-btn:focus-visible {
background: var(--editor-btn-bg-hover, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #5d94ef) 0%, var(--rj-primary, #2563eb) 70%));
}
.rj-copilot-proposal {
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
overflow: hidden;
}
.rj-copilot-proposal header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2-5, 10px);
padding: 9px var(--rj-space-2-5, 10px);
border-bottom: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-proposal header strong {
min-width: 0;
color: var(--rj-text, #0f172a);
font-size: 12px;
line-height: 1.25;
}
.rj-copilot-proposal header span {
flex: 0 0 auto;
color: var(--rj-text-muted, #64748b);
font-size: 11px;
}
.rj-copilot-proposal__diff {
display: grid;
grid-template-columns: 1fr;
gap: 1px;
background: var(--rj-border, #e2e8f0);
}
.rj-copilot-proposal__diff div {
padding: 9px var(--rj-space-2-5, 10px);
background: var(--rj-bg-elevated, #fff);
}
.rj-copilot-proposal__diff span {
display: block;
margin-bottom: var(--rj-space-1, 4px);
color: var(--rj-text-muted, #64748b);
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
}
.rj-copilot-proposal__diff p,
.rj-copilot-proposal__reason {
margin: 0;
color: var(--rj-text, #172033);
font-size: 12px;
line-height: 1.4;
overflow-wrap: anywhere;
}
.rj-copilot-proposal__reason {
padding: 9px var(--rj-space-2-5, 10px);
border-top: 1px solid var(--rj-border, #e2e8f0);
color: var(--rj-text-secondary, #475569);
}
.rj-copilot-bool {
display: inline-flex;
align-items: center;
min-height: 24px;
border-radius: 999px;
padding: 0 9px;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-bool--true {
background: #dcfce7;
color: #166534;
}
.rj-copilot-bool--false {
background: #fee2e2;
color: #991b1b;
}
.rj-copilot-option {
display: inline-flex;
align-items: center;
min-height: 24px;
border-radius: var(--rj-radius-md, 6px);
padding: 0 var(--rj-space-2, 8px);
background: var(--rj-bg-sunken, #f1f5f9);
color: var(--rj-text-secondary, #334155);
font-size: 12px;
font-weight: 700;
}
.rj-copilot-proposal__img {
display: block;
width: 100%;
max-height: 190px;
object-fit: contain;
border-radius: var(--rj-radius-md, 6px);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-variants {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
gap: var(--rj-space-1-5, 6px);
padding: var(--rj-space-2, 8px) var(--rj-space-2-5, 10px);
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg-elevated, #fff);
}
.rj-copilot-variant {
aspect-ratio: 1;
border: 2px solid transparent;
border-radius: var(--rj-radius-lg, 8px);
padding: 0;
background: var(--rj-bg-sunken, #f1f5f9);
cursor: pointer;
overflow: hidden;
}
.rj-copilot-variant.is-active {
border-color: var(--editor-primary, var(--rj-primary, #2563eb));
}
.rj-copilot-variant img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.rj-copilot-alt {
display: grid;
gap: 5px;
padding: var(--rj-space-2, 8px) var(--rj-space-2-5, 10px);
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg-elevated, #fff);
}
.rj-copilot-alt span {
color: var(--rj-text-muted, #64748b);
font-size: 11px;
font-weight: 700;
}
.rj-copilot-alt input {
width: 100%;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-md, 6px);
padding: var(--rj-space-2, 8px) 9px;
color: var(--rj-text, #172033);
font: inherit;
font-size: 12px;
}
.rj-copilot-proposal footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2-5, 10px);
padding: var(--rj-space-2, 8px) var(--rj-space-2-5, 10px);
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
color: var(--rj-text-muted, #64748b);
font-size: 11px;
line-height: 1.35;
}
.rj-copilot-proposal footer span {
min-width: 0;
}
.rj-copilot-proposal__actions {
display: inline-flex;
flex: 0 0 auto;
gap: var(--rj-space-1-5, 6px);
}
.rj-copilot-apply {
flex: 0 0 auto;
min-height: 30px;
border: 0;
border-radius: var(--editor-btn-radius, 7px);
padding: 0 var(--rj-space-2-5, 10px);
background: var(--editor-btn-bg, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #4580ed) 0%, var(--rj-primary, #2563eb) 70%));
color: var(--rj-text-on-primary, #fff);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-copy {
flex: 0 0 auto;
min-height: 30px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--editor-btn-radius, 7px);
padding: 0 var(--rj-space-2-5, 10px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-create-btn,
.rj-copilot-image-run,
.rj-copilot-apply-all,
.rj-copilot-details-btn,
.rj-copilot-modal-confirm,
.rj-copilot-change-submit,
.rj-copilot-content-submit {
min-height: 30px;
border: 0;
border-radius: var(--editor-btn-radius, 7px);
padding: 0 16px;
background: var(--editor-btn-bg, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #4580ed) 0%, var(--rj-primary, #2563eb) 70%));
color: var(--rj-text-on-primary, #fff);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-apply:hover,
.rj-copilot-apply:focus-visible,
.rj-copilot-create-btn:hover,
.rj-copilot-create-btn:focus-visible,
.rj-copilot-image-run:hover,
.rj-copilot-image-run:focus-visible,
.rj-copilot-apply-all:hover,
.rj-copilot-apply-all:focus-visible,
.rj-copilot-details-btn:hover,
.rj-copilot-details-btn:focus-visible,
.rj-copilot-modal-confirm:hover,
.rj-copilot-modal-confirm:focus-visible,
.rj-copilot-change-submit:hover,
.rj-copilot-change-submit:focus-visible,
.rj-copilot-content-submit:hover,
.rj-copilot-content-submit:focus-visible {
background: var(--editor-btn-bg-hover, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #5d94ef) 0%, var(--rj-primary, #2563eb) 70%));
}
.rj-copilot-modal-backdrop {
position: fixed;
inset: 0;
z-index: 1000000;
display: grid;
place-items: center;
padding: 18px;
background: rgba(15, 23, 42, 0.38);
}
.rj-copilot-modal {
width: min(420px, calc(100vw - 32px));
max-height: min(520px, calc(100vh - 48px));
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
overflow: hidden;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
}
.rj-copilot-modal--wide {
width: min(620px, calc(100vw - 32px));
}
.rj-copilot-modal header {
padding: 18px 22px;
border-bottom: 1px solid var(--rj-border, #e2e8f0);
}
.rj-copilot-modal header strong {
display: block;
color: var(--rj-text, #172033);
font-size: 15px;
}
.rj-copilot-modal header span {
display: block;
margin-top: var(--rj-space-1, 4px);
color: var(--rj-text-muted, #64748b);
font-size: 12px;
line-height: 1.35;
}
.rj-copilot-modal__body {
overflow: auto;
padding: var(--rj-space-5, 20px) 22px;
color: var(--rj-text-secondary, #334155);
font-size: 13px;
line-height: 1.45;
}
.rj-copilot-modal__body--flush {
padding: 0;
}
.rj-copilot-modal__body p {
margin: 0;
}
.rj-copilot-modal__body ul {
display: grid;
gap: 7px;
margin: var(--rj-space-3, 12px) 0 0;
padding-left: 18px;
}
.rj-copilot-modal footer {
display: flex;
justify-content: flex-end;
gap: var(--rj-space-2, 8px);
padding: var(--rj-space-4, 16px) 22px;
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-modal-cancel {
min-height: 30px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--editor-btn-radius, 7px);
padding: 0 16px;
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-image-cancel,
.rj-copilot-history-close,
.rj-copilot-history-new,
.rj-copilot-change-cancel,
.rj-copilot-content-cancel {
min-height: 30px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--editor-btn-radius, 7px);
padding: 0 16px;
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
cursor: pointer;
font-size: 12px;
font-weight: 700;
}
.rj-copilot-modal--wide .rj-copilot-image-options {
margin: 0;
border: 0;
border-radius: 0;
}
.rj-copilot-modal--image {
width: min(760px, calc(100vw - 32px));
height: min(640px, calc(100vh - 48px));
max-height: calc(100vh - 48px);
min-width: min(420px, calc(100vw - 32px));
min-height: min(360px, calc(100vh - 48px));
resize: vertical;
}
.rj-copilot-history-list {
display: grid;
gap: var(--rj-space-2, 8px);
}
.rj-copilot-history-item {
display: grid;
grid-template-columns: 1fr 34px;
gap: var(--rj-space-2, 8px);
align-items: stretch;
}
.rj-copilot-history-load {
display: grid;
gap: 3px;
min-width: 0;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
padding: 9px var(--rj-space-2-5, 10px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text, #172033);
cursor: pointer;
text-align: left;
}
.rj-copilot-history-item.is-active .rj-copilot-history-load {
border-color: var(--editor-primary, var(--rj-primary, #2563eb));
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 8%, #fff);
}
.rj-copilot-history-load strong {
min-width: 0;
font-size: 12px;
line-height: 1.3;
overflow-wrap: anywhere;
}
.rj-copilot-history-load span,
.rj-copilot-history-empty {
color: var(--rj-text-muted, #64748b);
font-size: 11px;
line-height: 1.35;
}
.rj-copilot-history-empty {
margin: 0;
}
.rj-copilot-history-delete {
display: grid;
place-items: center;
width: 34px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
color: #991b1b;
cursor: pointer;
}
.rj-copilot-history-delete svg {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
stroke-linecap: round;
stroke-linejoin: round;
}
.rj-copilot-modal-cancel:hover,
.rj-copilot-modal-cancel:focus-visible,
.rj-copilot-image-cancel:hover,
.rj-copilot-image-cancel:focus-visible,
.rj-copilot-history-close:hover,
.rj-copilot-history-close:focus-visible,
.rj-copilot-history-new:hover,
.rj-copilot-history-new:focus-visible,
.rj-copilot-change-cancel:hover,
.rj-copilot-change-cancel:focus-visible,
.rj-copilot-content-cancel:hover,
.rj-copilot-content-cancel:focus-visible,
.rj-copilot-history-load:hover,
.rj-copilot-history-load:focus-visible,
.rj-copilot-history-delete:hover,
.rj-copilot-history-delete:focus-visible {
background: var(--rj-bg-sunken, #f1f5f9);
}
.rj-copilot-copy:hover,
.rj-copilot-copy:focus-visible {
background: var(--rj-bg-sunken, #f1f5f9);
}
.rj-copilot-image-settings {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--rj-space-2, 8px);
padding: 0 var(--rj-space-2-5, 10px) var(--rj-space-2-5, 10px);
}
.rj-copilot-image-settings label {
display: grid;
gap: var(--rj-space-1, 4px);
color: var(--rj-text-secondary, #475569);
font-size: 11px;
font-weight: 700;
}
.rj-copilot-content-fields {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--rj-space-2-5, 10px);
}
.rj-copilot-content-fields label {
display: grid;
gap: 5px;
color: var(--rj-text-secondary, #475569);
font-size: 12px;
font-weight: 700;
}
.rj-copilot-content-fields label:has(textarea) {
grid-column: 1 / -1;
}
.rj-copilot-content-fields label:has([data-change-draft-field]) {
grid-column: 1 / -1;
}
.rj-copilot-field-hint {
grid-column: 1 / -1;
margin: -3px 0 2px;
color: var(--rj-text-muted, #64748b);
font-size: 12px;
line-height: 1.4;
}
.rj-copilot-current-field {
grid-column: 1 / -1;
display: grid;
gap: 5px;
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
border: 1px solid var(--rj-border, #dbe3ef);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg, #f8fafc);
color: var(--rj-text-secondary, #475569);
}
.rj-copilot-current-field span {
font-size: 12px;
font-weight: 700;
}
.rj-copilot-current-field p {
margin: 0;
max-height: 120px;
overflow: auto;
color: var(--rj-text, #172033);
font-size: 13px;
font-weight: 500;
line-height: 1.45;
white-space: pre-wrap;
word-break: break-word;
}
.rj-copilot-current-field p.is-empty {
color: var(--rj-text-muted, #64748b);
font-weight: 500;
}
.rj-copilot-content-fields input,
.rj-copilot-content-fields textarea {
width: 100%;
min-height: 34px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
padding: 7px 9px;
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text, #172033);
font: inherit;
font-size: 13px;
box-sizing: border-box;
}
.rj-copilot-content-fields textarea {
min-height: 86px;
resize: vertical;
}
.rj-copilot-form {
display: grid;
grid-template-columns: 1fr;
gap: var(--rj-space-2, 8px);
padding: var(--rj-space-3, 12px);
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-copilot-input {
width: 100%;
min-height: 42px;
max-height: 120px;
resize: vertical;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
padding: var(--rj-space-2-5, 10px) 11px;
color: var(--rj-text, #172033);
font: inherit;
font-size: 13px;
line-height: 1.35;
}
.rj-copilot-input:focus {
outline: 2px solid color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 35%, transparent);
outline-offset: 1px;
border-color: var(--editor-primary, var(--rj-primary, #2563eb));
}
.rj-copilot-actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: var(--rj-space-2, 8px);
}
.rj-copilot-send {
min-height: 36px;
border: 0;
border-radius: var(--editor-btn-radius, 7px);
padding: 0 var(--rj-space-3-5, 14px);
background: var(--editor-btn-bg, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #4580ed) 0%, var(--rj-primary, #2563eb) 70%));
color: var(--rj-text-on-primary, #fff);
cursor: pointer;
font-size: 13px;
font-weight: 700;
box-shadow: none;
}
.rj-copilot-draft,
.rj-copilot-content,
.rj-copilot-image {
min-height: 36px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--editor-btn-radius, 8px);
padding: 0 var(--rj-space-3, 12px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
cursor: pointer;
font-weight: 700;
}
.rj-copilot-send:hover,
.rj-copilot-send:focus-visible {
background: var(--editor-btn-bg-hover, radial-gradient(ellipse at 50% 0%, var(--rj-primary-hover, #5d94ef) 0%, var(--rj-primary, #2563eb) 70%));
}
.rj-copilot-draft:hover,
.rj-copilot-draft:focus-visible,
.rj-copilot-content:hover,
.rj-copilot-content:focus-visible,
.rj-copilot-image:hover,
.rj-copilot-image:focus-visible {
background: var(--rj-bg-sunken, #f1f5f9);
}
.rj-copilot-actions button:disabled {
cursor: not-allowed;
opacity: 0.45;
}
@media (max-width: 520px) {
.rj-copilot {
right: 12px;
bottom: 12px;
}
.rj-copilot-panel {
right: -4px;
bottom: 68px;
width: calc(100vw - 24px);
height: min(560px, calc(100vh - 96px));
}
.rj-copilot.is-maximized .rj-copilot-panel {
right: -4px;
bottom: -8px;
width: calc(100vw - 24px);
height: calc(100vh - 24px);
}
}
/* ------------------------------------------------------------------ */
/* AI agent (js/ai-agent.js) */
/* ------------------------------------------------------------------ */
.rj-copilot--agent .rj-copilot-draft,
.rj-copilot--agent .rj-copilot-content,
.rj-copilot--agent .rj-copilot-image {
display: none !important;
}
.rj-agent-controls {
display: flex;
align-items: center;
gap: var(--rj-space-2, 8px);
margin-right: auto;
}
.rj-agent-mode {
display: inline-flex;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--editor-btn-radius, 8px);
background: var(--rj-bg-elevated, #fff);
overflow: hidden;
}
.rj-agent-mode button {
min-height: 34px;
border: 0;
padding: 0 11px;
background: transparent;
color: var(--rj-text-secondary, #475569);
cursor: pointer;
font: inherit;
font-size: 12px;
font-weight: 700;
}
.rj-agent-mode button + button {
border-left: 1px solid var(--rj-border, #e2e8f0);
}
.rj-agent-mode button[aria-pressed="true"] {
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 12%, #fff);
color: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 75%, var(--rj-text, #0f172a));
}
.rj-agent-attach {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
min-height: 36px;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--editor-btn-radius, 8px);
padding: 0;
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
cursor: pointer;
}
.rj-agent-attach[hidden] {
display: none;
}
.rj-agent-attach:hover:not(:disabled),
.rj-agent-attach:focus-visible {
background: var(--rj-bg-sunken, #f1f5f9);
}
.rj-agent-attach:disabled {
cursor: not-allowed;
opacity: 0.45;
}
.rj-agent-attach svg,
.rj-agent-step__mark svg,
.rj-agent-tag svg,
.rj-agent-ok svg,
.rj-agent-source__warning svg {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.rj-agent-chips {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--rj-space-1-5, 6px);
}
.rj-agent-chips[hidden] {
display: none;
}
.rj-agent-chip {
display: inline-flex;
align-items: center;
gap: var(--rj-space-1-5, 6px);
max-width: 100%;
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: 999px;
padding: var(--rj-space-0-5, 2px) var(--rj-space-2-5, 10px) var(--rj-space-0-5, 2px) var(--rj-space-0-5, 2px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text-secondary, #334155);
font-size: 12px;
}
.rj-agent-chip img {
width: 28px;
height: 28px;
border-radius: 50%;
object-fit: cover;
}
.rj-agent-chip--busy {
padding: 5px var(--rj-space-2-5, 10px);
}
.rj-agent-chip span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rj-agent-link {
border: 0;
padding: var(--rj-space-0-5, 2px) var(--rj-space-1, 4px);
background: none;
color: var(--editor-primary, var(--rj-primary, #2563eb));
cursor: pointer;
font: inherit;
font-size: 12px;
font-weight: 700;
text-decoration: underline;
}
.rj-agent-link:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.rj-agent-drop {
position: absolute;
inset: 0;
z-index: 5;
display: none;
align-items: center;
justify-content: center;
margin: var(--rj-space-2, 8px);
border: 2px dashed var(--editor-primary, var(--rj-primary, #2563eb));
border-radius: var(--rj-radius-xl, 12px);
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 10%, rgba(255, 255, 255, 0.92));
color: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 75%, var(--rj-text, #0f172a));
font-size: 14px;
font-weight: 700;
pointer-events: none;
}
.rj-copilot-panel.is-dragging .rj-agent-drop {
display: flex;
}
.rj-agent {
display: grid;
gap: var(--rj-space-2-5, 10px);
margin: var(--rj-space-3, 12px) 0;
font-size: 13px;
line-height: 1.45;
}
.rj-agent p,
.rj-agent ul,
.rj-agent ol {
margin: 0;
}
.rj-agent h4 {
margin: 0 0 var(--rj-space-1-5, 6px);
color: var(--rj-text, #0f172a);
font-size: 12px;
font-weight: 700;
letter-spacing: 0;
}
.rj-agent-intro,
.rj-agent-run,
.rj-agent-package {
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
overflow: hidden;
}
.rj-agent-intro {
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
border-color: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 30%, var(--rj-border-strong, #cbd5e1));
background: color-mix(in srgb, var(--editor-primary, var(--rj-primary, #2563eb)) 6%, #fff);
color: var(--rj-text-secondary, #334155);
}
.rj-agent-intro strong {
display: block;
margin-bottom: var(--rj-space-0-5, 2px);
color: var(--rj-text, #0f172a);
}
.rj-agent-run {
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
}
.rj-agent-run__head {
display: flex;
align-items: center;
gap: var(--rj-space-2, 8px);
}
.rj-agent-run__head strong {
flex: 1 1 auto;
min-width: 0;
font-size: 13px;
overflow-wrap: anywhere;
}
.rj-agent-steps {
display: grid;
gap: var(--rj-space-1, 4px);
margin-top: var(--rj-space-2, 8px) !important;
padding: 0;
list-style: none;
}
.rj-agent-steps li {
display: flex;
align-items: flex-start;
gap: var(--rj-space-1-5, 6px);
color: var(--rj-text-secondary, #475569);
font-size: 12px;
overflow-wrap: anywhere;
}
.rj-agent-steps li.is-failed {
color: var(--rj-brand, #b45309);
}
.rj-agent-steps em {
font-style: normal;
opacity: 0.8;
}
.rj-agent-step__mark {
flex: 0 0 auto;
display: inline-flex;
margin-top: 1px;
color: #15803d;
}
.rj-agent-steps li.is-failed .rj-agent-step__mark {
color: var(--rj-brand, #b45309);
}
.rj-agent-steps-details summary,
.rj-agent-notes summary,
.rj-agent-op summary {
cursor: pointer;
color: var(--rj-text-secondary, #334155);
font-size: 12px;
font-weight: 700;
}
.rj-agent-package > header,
.rj-agent-package > footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2-5, 10px);
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
}
.rj-agent-package > header {
border-bottom: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-agent-package > header strong {
color: var(--rj-text, #0f172a);
font-size: 13px;
}
.rj-agent-package > :not(header):not(footer) {
margin: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
}
.rj-agent-package > footer {
flex-wrap: wrap;
justify-content: flex-end;
border-top: 1px solid var(--rj-border, #e2e8f0);
background: var(--rj-bg, #f8fafc);
}
.rj-agent-package--quiet {
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
color: var(--rj-text-secondary, #475569);
}
.rj-agent-actions button {
display: inline-flex;
align-items: center;
gap: var(--rj-space-1-5, 6px);
}
.rj-agent-actions button:disabled {
cursor: not-allowed;
opacity: 0.45;
}
.rj-agent-summary {
color: var(--rj-text, #172033);
overflow-wrap: anywhere;
}
.rj-agent-tag {
display: inline-flex;
align-items: center;
gap: var(--rj-space-1, 4px);
border-radius: 999px;
padding: var(--rj-space-0-5, 2px) var(--rj-space-2, 8px);
background: var(--rj-border, #e2e8f0);
color: var(--rj-text-secondary, #334155);
font-size: 11px;
font-weight: 700;
white-space: nowrap;
}
.rj-agent-tag--ok {
background: #dcfce7;
color: #166534;
}
.rj-agent-tag--warn {
background: #fef3c7;
color: #92400e;
}
.rj-agent-tag--danger {
background: #fee2e2;
color: #b91c1c;
}
.rj-agent-tag--ai {
background: #ede9fe;
color: #5b21b6;
}
.rj-agent-tag svg {
width: 12px;
height: 12px;
}
.rj-agent-note {
display: grid;
gap: var(--rj-space-1-5, 6px);
border-radius: var(--rj-radius-lg, 8px);
padding: 9px 11px;
font-size: 12px;
}
.rj-agent-note--warn {
border: 1px solid #fcd34d;
background: #fffbeb;
color: #78350f;
}
.rj-agent-note--info {
border: 1px solid var(--rj-border-strong, #cbd5e1);
background: var(--rj-bg-sunken, #f1f5f9);
color: var(--rj-text-secondary, #334155);
}
.rj-agent-note ul {
padding-left: 18px;
}
.rj-agent-note button {
justify-self: start;
}
.rj-agent-ok {
display: flex;
align-items: center;
gap: var(--rj-space-1-5, 6px);
color: #166534;
font-size: 12px;
font-weight: 700;
}
.rj-agent-target ul {
display: grid;
gap: var(--rj-space-1-5, 6px);
padding: 0;
list-style: none;
}
.rj-agent-op {
border: 1px solid var(--rj-border, #e2e8f0);
border-radius: var(--rj-radius-lg, 8px);
padding: 7px 9px;
background: var(--rj-bg-elevated, #fff);
}
.rj-agent-op.is-destructive {
border-color: #fecaca;
background: #fef2f2;
}
.rj-agent-diff {
display: grid;
gap: var(--rj-space-1-5, 6px);
margin-top: var(--rj-space-2, 8px);
}
.rj-agent-diff span {
display: block;
margin-bottom: var(--rj-space-0-5, 2px);
color: var(--rj-text-muted, #64748b);
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
}
.rj-agent-diff p {
color: var(--rj-text, #172033);
font-size: 12px;
overflow-wrap: anywhere;
white-space: pre-line;
}
.rj-agent-empty {
color: var(--rj-text-muted, #94a3b8);
}
.rj-agent-media-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: var(--rj-space-2, 8px);
}
.rj-agent-media {
margin: 0;
border: 1px solid var(--rj-border, #e2e8f0);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
overflow: hidden;
}
.rj-agent-media img {
display: block;
width: 100%;
height: 80px;
object-fit: cover;
background: var(--rj-border, #e2e8f0);
}
.rj-agent-media figcaption {
display: grid;
gap: 3px;
padding: 5px 7px;
color: var(--rj-text-secondary, #475569);
font-size: 11px;
overflow-wrap: anywhere;
}
.rj-agent-media__credit {
color: var(--rj-text-muted, #64748b);
}
.rj-agent-sources,
.rj-agent-items {
display: grid;
gap: var(--rj-space-1-5, 6px);
padding: 0;
list-style: none;
}
.rj-agent-sources li {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--rj-space-1-5, 6px);
font-size: 12px;
overflow-wrap: anywhere;
}
.rj-agent-sources a {
color: var(--editor-primary, var(--rj-primary, #2563eb));
}
.rj-agent-source__meta {
color: var(--rj-text-muted, #64748b);
font-size: 11px;
}
.rj-agent-source__warning {
display: inline-flex;
color: var(--rj-brand, #b45309);
}
.rj-agent-items li {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--rj-space-2, 8px);
font-size: 12px;
overflow-wrap: anywhere;
}
.rj-agent-hint {
color: var(--rj-text-muted, #64748b);
font-size: 11px;
}
/* Limits that are nearly used up (shown above the chat) */
.rj-copilot-limit {
margin-bottom: var(--rj-space-3, 12px);
padding: 9px var(--rj-space-3, 12px);
border: 1px solid #fcd34d;
border-radius: var(--rj-radius-lg, 8px);
background: #fffbeb;
color: #78350f;
font-size: 12px;
line-height: 1.4;
}
.rj-copilot-limit p {
margin: 0 0 var(--rj-space-1, 4px);
}
.rj-copilot-limit__line--reached {
color: #991b1b;
font-weight: 700;
}
.rj-copilot-limit__hint {
margin-bottom: 0 !important;
color: #92400e;
}
/* Dashboard actions: cards the person confirms (open a section, change the dashboard look) */
.rj-copilot-dash-list {
display: grid;
gap: var(--rj-space-2, 8px);
margin: var(--rj-space-1, 4px) 0 var(--rj-space-3, 12px);
}
.rj-copilot-dash {
display: grid;
gap: var(--rj-space-2, 8px);
padding: var(--rj-space-2-5, 10px) var(--rj-space-3, 12px);
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
}
.rj-copilot-dash strong {
display: block;
color: var(--rj-text, #0f172a);
font-size: 13px;
}
.rj-copilot-dash span {
display: block;
margin-top: var(--rj-space-0-5, 2px);
color: var(--rj-text-secondary, #475569);
font-size: 12px;
}
.rj-copilot-dash footer {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--rj-space-2, 8px);
}
.rj-copilot-dash footer em {
flex: 1 1 100%;
color: var(--rj-text-secondary, #475569);
font-size: 12px;
font-style: normal;
}
.rj-copilot-dash footer .rj-copilot-dash__ok {
color: #166534;
}
.rj-copilot-dash footer .rj-copilot-dash__error {
color: #b91c1c;
}
.rj-copilot-dash button {
min-height: 32px;
padding: 0 var(--rj-space-3, 12px);
border: 1px solid var(--rj-border-strong, #cbd5e1);
border-radius: var(--rj-radius-lg, 8px);
background: var(--rj-bg-elevated, #fff);
color: var(--rj-text, #172033);
font: inherit;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
.rj-copilot-dash .rj-copilot-dash-run {
border-color: var(--rj-primary, #1e3a8a);
background: var(--rj-primary, #1e3a8a);
color: var(--rj-text-on-primary, #fff);
}
.rj-copilot-dash button:focus-visible {
outline: 2px solid var(--rj-primary, #2563eb);
outline-offset: 2px;
}
/* Links to places in the dashboard (open in a new tab) */
.rj-copilot-dash-link,
.rj-copilot-dash footer a.rj-copilot-dash-link {
display: inline-flex;
align-items: center;
min-height: 32px;
padding: 0 var(--rj-space-1, 4px);
color: var(--rj-primary, #1e3a8a);
font-size: 12px;
font-weight: 700;
text-decoration: underline;
}
.rj-copilot-dash-link:focus-visible {
outline: 2px solid var(--rj-primary, #2563eb);
outline-offset: 2px;
}
.rj-copilot-dash--link {
border-style: dashed;
}
.rj-agent-where ul {
margin: var(--rj-space-1-5, 6px) 0 0;
padding: 0;
list-style: none;
}
.rj-agent-where li {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: var(--rj-space-1-5, 6px) var(--rj-space-3, 12px);
padding: var(--rj-space-1, 4px) 0;
}
.rj-agent-where .rj-agent-hint {
display: block;
}
.rj-agent-where__open {
flex: 0 0 auto;
text-decoration: underline;
}
.rj-agent-risk {
border-left: 4px solid var(--rj-brand, #b45309);
}
/* Safety note on a suggestion or draft */
.rj-copilot-safety {
margin: var(--rj-space-2, 8px) 0 0;
padding: var(--rj-space-2, 8px) var(--rj-space-2-5, 10px);
border-left: 4px solid var(--rj-brand, #b45309);
border-radius: var(--rj-radius-md, 6px);
background: #fffbeb;
color: #78350f;
font-size: 12px;
line-height: 1.45;
}
.rj-agent-mode[hidden] {
display: none;
}
/* The chat inside a card of the page (dashboard home): no bubble, no floating panel. */
.rj-copilot.rj-copilot--embedded {
position: static;
z-index: auto;
right: auto;
bottom: auto;
}
.rj-copilot--embedded .rj-copilot-toggle,
.rj-copilot--embedded .rj-copilot-close,
.rj-copilot--embedded .rj-copilot-maximize,
.rj-copilot--embedded .rj-copilot-header__top {
display: none; /* the card has its own title */
}
.rj-copilot--embedded .rj-copilot-panel {
position: static;
width: 100%;
height: min(620px, 70vh);
box-shadow: none;
border-radius: var(--rj-radius-lg, 8px);
}
.rj-copilot--embedded.is-maximized .rj-copilot-panel {
width: 100%;
height: min(620px, 70vh);
}