humainflow-web/src/app/shared/nodes/generic-node/generic-node.css

895 lines
16 KiB
CSS

.llm-node {
position: relative;
width: 280px;
user-select: none;
-webkit-user-select: none;
border-radius: 16px;
border: 1px solid #dbe2ea;
background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
overflow: visible;
color: #0f172a;
}
.llm-delete-overlay {
position: absolute;
inset: 0;
z-index: 135;
border-radius: 16px;
background: rgba(148, 163, 184, 0.38);
backdrop-filter: grayscale(1) saturate(0.2);
}
.llm-loading-overlay {
position: absolute;
inset: 0;
z-index: 150;
display: flex;
align-items: center;
justify-content: center;
background: rgba(248, 250, 252, 0.68);
backdrop-filter: blur(2px);
border-radius: 16px;
}
.llm-loading-chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border: 1px solid #bfdbfe;
border-radius: 999px;
background: rgba(255, 255, 255, 0.96);
color: #1d4ed8;
font-size: 12px;
font-weight: 600;
box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}
.llm-spinner {
width: 14px;
height: 14px;
border-radius: 999px;
border: 2px solid rgba(37, 99, 235, 0.2);
border-top-color: #2563eb;
animation: llm-spin 0.75s linear infinite;
}
@keyframes llm-spin {
to {
transform: rotate(360deg);
}
}
.llm-node--human {
border-color: #f7d7a7;
background: linear-gradient(180deg, #fffdf9 0%, #fff7ed 100%);
box-shadow: 0 10px 24px rgba(124, 45, 18, 0.14);
color: #431407;
}
.llm-node-error {
border: 2px solid #dc2626;
box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), 0 10px 24px rgba(15, 23, 42, 0.12);
}
.llm-node-warning {
border: 2px solid #eab308;
box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.22), 0 10px 24px rgba(15, 23, 42, 0.12);
}
.llm-error-alert-wrap {
position: absolute;
top: -12px;
right: -12px;
z-index: 120;
}
.llm-error-alert {
width: 26px;
height: 26px;
border-radius: 999px;
border: 1px solid #fecaca;
background: #dc2626;
color: #fff7ed;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 13px;
box-shadow: 0 0 0 3px rgba(127, 29, 29, 0.2);
}
.llm-error-tooltip {
position: absolute;
top: calc(100% + 8px);
right: 0;
min-width: 220px;
max-width: 320px;
border: 1px solid #fecaca;
border-radius: 8px;
background: #fff1f2;
color: #7f1d1d;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
padding: 8px;
z-index: 130;
opacity: 0;
visibility: hidden;
transform: translateY(-2px);
transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.llm-error-alert-wrap:hover .llm-error-tooltip {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.llm-error-title {
font-size: 11px;
font-weight: 700;
margin-bottom: 4px;
}
.llm-error-item {
font-size: 11px;
line-height: 1.3;
}
.llm-warning-alert-wrap {
position: absolute;
top: -12px;
left: -12px;
z-index: 120;
}
.llm-warning-alert {
width: 26px;
height: 26px;
border-radius: 999px;
border: 1px solid #fde68a;
background: #eab308;
color: #422006;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 13px;
box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.22);
}
.llm-warning-list-tooltip {
position: absolute;
top: calc(100% + 8px);
left: 0;
min-width: 220px;
max-width: 320px;
border: 1px solid #fde68a;
border-radius: 8px;
background: #fef9c3;
color: #713f12;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
padding: 8px;
z-index: 130;
opacity: 0;
visibility: hidden;
transform: translateY(-2px);
transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.llm-warning-alert-wrap:hover .llm-warning-list-tooltip {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.llm-warning-list-title {
font-size: 11px;
font-weight: 700;
margin-bottom: 4px;
}
.llm-warning-list-item {
font-size: 11px;
line-height: 1.3;
}
.llm-header {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-bottom: 1px solid #e8edf4;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
border-top-left-radius: 16px;
border-top-right-radius: 16px;
}
.llm-node--human .llm-header {
background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
border-bottom-color: #fdba74;
}
.llm-node--human .llm-icon {
color: #fffbeb;
}
.llm-node--human .llm-title {
color: #fffbeb;
}
.llm-node--human .llm-subtitle {
color: #fff7ed;
}
.llm-icon {
width: 32px;
height: 32px;
border-radius: 10px;
background: rgba(255, 255, 255, 0.18);
border: 1px solid rgba(255, 255, 255, 0.28);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.llm-icon-image {
width: 24px;
height: 16px;
object-fit: contain;
}
.llm-header-content {
min-width: 0;
display: flex;
flex-direction: column;
line-height: 1.2;
}
.llm-subtitle-row {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.llm-header-actions {
margin-left: auto;
display: inline-flex;
align-items: center;
gap: 6px;
position: relative;
}
.llm-delete-confirm {
position: absolute;
top: calc(100% + 8px);
right: 32px;
z-index: 145;
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
border: 1px solid #fca5a5;
border-radius: 10px;
background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
color: #881337;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
white-space: nowrap;
filter: none;
}
.llm-delete-confirm-text {
font-size: 11px;
font-weight: 700;
}
.llm-delete-confirm-cancel,
.llm-delete-confirm-action {
border: 0;
border-radius: 999px;
padding: 4px 9px;
font-size: 11px;
font-weight: 700;
cursor: pointer;
}
.llm-delete-confirm-cancel {
background: rgba(255, 255, 255, 0.88);
color: #7f1d1d;
border: 1px solid #fecaca;
}
.llm-delete-confirm-action {
background: #dc2626;
color: #fff7ed;
}
.llm-delete-btn {
position: relative;
z-index: 146;
}
.llm-warning {
width: 24px;
height: 24px;
border-radius: 999px;
border: 1px solid #fecaca;
background: #dc2626;
color: #fff7ed;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 13px;
box-shadow: 0 0 0 2px rgba(127, 29, 29, 0.18);
}
.llm-title {
font-size: 13px;
font-weight: 700;
letter-spacing: 0.02em;
color: #eff6ff;
}
.llm-subtitle {
font-size: 11px;
color: #dbeafe;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.llm-name-edit-btn {
border: none;
background: rgba(255, 255, 255, 0.2);
color: #eff6ff;
border-radius: 999px;
width: 18px;
height: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
transition: background-color 0.15s ease;
}
.llm-name-edit-btn:hover {
background: rgba(255, 255, 255, 0.3);
}
.llm-warning-wrap {
position: relative;
margin-left: 0;
}
.llm-delete-btn {
width: 24px;
height: 24px;
border-radius: 999px;
border: 1px solid rgba(185, 28, 28, 0.45);
background: rgba(127, 29, 29, 0.2);
color: #fff1f2;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background-color 0.15s ease;
}
.llm-delete-btn:hover {
background: rgba(127, 29, 29, 0.35);
}
.llm-warning-tooltip {
position: absolute;
top: calc(100% + 8px);
right: 0;
min-width: 180px;
max-width: 240px;
border: 1px solid #fecaca;
border-radius: 8px;
background: #fff1f2;
color: #7f1d1d;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
padding: 8px;
z-index: 80;
opacity: 0;
visibility: hidden;
transform: translateY(-2px);
transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.llm-warning-wrap:hover .llm-warning-tooltip {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.llm-warning-title {
font-size: 11px;
font-weight: 700;
margin-bottom: 4px;
}
.llm-warning-item {
font-size: 11px;
}
.llm-body {
padding: 12px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.llm-column {
min-width: 0;
display: flex;
flex-direction: column;
gap: 6px;
}
.llm-column-title {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #64748b;
}
.llm-column-title-right {
text-align: right;
}
.llm-row {
display: grid;
align-items: center;
height: 24px;
min-width: 0;
}
.llm-row-input {
grid-template-columns: 16px 1fr;
gap: 6px;
}
.llm-row-output {
grid-template-columns: 1fr 16px;
gap: 6px;
}
.llm-socket {
position: relative;
z-index: 20;
}
.llm-socket-right {
justify-self: end;
}
.llm-pill {
height: 24px;
border-radius: 7px;
border: 1px solid transparent;
font-size: 11px;
font-weight: 600;
padding: 0 8px;
display: inline-flex;
align-items: center;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.llm-pill-input {
justify-content: flex-start;
color: #166534;
background: #ecfdf3;
border-color: #bbf7d0;
gap: 4px;
overflow: visible;
}
.llm-node--human .llm-pill-input {
color: #7c2d12;
background: #ffedd5;
border-color: #fed7aa;
}
.llm-node--human .llm-pill-output {
color: #9f1239;
background: #fff1f2;
border-color: #fecdd3;
}
.llm-pill-output {
justify-content: flex-end;
color: #9f1239;
background: #fff1f2;
border-color: #fecdd3;
}
.llm-pill-output-true {
color: #166534;
background: #ecfdf3;
border-color: #bbf7d0;
}
.llm-pill-output-false {
color: #9f1239;
background: #fff1f2;
border-color: #fecdd3;
}
.llm-input-info {
border: none;
background: transparent;
color: #166534;
width: 14px;
height: 14px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
cursor: help;
flex-shrink: 0;
}
.llm-input-info-wrap {
position: relative;
display: inline-flex;
align-items: center;
}
.llm-input-tooltip {
position: absolute;
left: calc(100% + 6px);
top: 50%;
transform: translateY(-50%);
min-width: 140px;
max-width: 260px;
border: 1px solid #dbeafe;
border-radius: 8px;
background: #ffffff;
color: #0f172a;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
font-size: 11px;
line-height: 1.3;
padding: 6px 8px;
white-space: pre-wrap;
word-break: break-word;
z-index: 80;
opacity: 0;
visibility: hidden;
pointer-events: none;
}
.llm-input-info-wrap:hover .llm-input-tooltip,
.llm-input-info-wrap:focus-within .llm-input-tooltip {
opacity: 1;
visibility: visible;
}
.llm-params {
margin: 0 12px 12px;
padding: 10px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #f8fafc;
display: flex;
flex-direction: column;
gap: 8px;
}
.llm-params-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.llm-params-title {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
color: #475569;
}
.llm-param-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px;
}
.llm-param-groups {
display: flex;
flex-direction: column;
gap: 8px;
}
.llm-param-fieldset {
margin: 0;
padding: 8px;
border: 1px solid #cbd5e1;
border-radius: 0;
background: transparent;
}
.llm-param-legend {
margin: 0;
padding: 0 4px;
font-size: 10px;
font-weight: 700;
color: #475569;
text-transform: uppercase;
letter-spacing: 0.03em;
display: table;
max-width: 100%;
white-space: nowrap;
float: none;
width: auto;
margin-bottom: 0;
}
.llm-params-title-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.llm-params-title {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.03em;
color: #64748b;
font-weight: 700;
}
.llm-param-chip {
border: 1px solid #dbeafe;
background: #eff6ff;
border-radius: 8px;
padding: 6px 8px;
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
}
.llm-param-chip-wide {
grid-column: 1 / -1;
}
.llm-param-row-head {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 6px;
min-width: 0;
}
.llm-edit-btn {
border: none;
background: transparent;
color: #64748b;
border-radius: 999px;
width: 18px;
height: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.llm-edit-btn:hover {
color: #2563eb;
background: rgba(37, 99, 235, 0.1);
transform: translateY(-1px);
}
.llm-edit-btn:active {
transform: translateY(0);
}
.llm-param-block {
border: 1px solid #dbe2ea;
background: #ffffff;
border-radius: 8px;
padding: 8px;
}
.llm-param-text {
font-size: 11px;
color: #1e293b;
white-space: pre-wrap;
word-break: break-word;
margin-top: 4px;
line-height: 1.45;
}
.llm-inline-token {
display: inline-flex;
align-items: center;
padding: 0 6px;
min-height: 18px;
margin: 0 2px;
border-radius: 6px;
border: 1px solid #bbf7d0;
background: #ecfdf3;
color: #166534;
font-size: 10px;
font-weight: 600;
}
.llm-param-list {
display: flex;
flex-direction: column;
gap: 4px;
}
.llm-param-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
border: 1px solid #dbe2ea;
background: #ffffff;
border-radius: 8px;
padding: 6px 8px;
}
.llm-param-key {
font-size: 10px;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.03em;
flex-shrink: 0;
}
.llm-param-key-label {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
line-height: 1.15;
}
.llm-param-value {
font-size: 11px;
color: #0f172a;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.llm-modal-backdrop {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.45);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: 12px;
}
.llm-modal {
width: min(360px, calc(100vw - 24px));
border-radius: 12px;
border: 1px solid #dbe2ea;
background: #ffffff;
box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
padding: 14px;
display: flex;
flex-direction: column;
gap: 10px;
}
.llm-modal-title {
font-size: 13px;
font-weight: 700;
color: #0f172a;
}
.llm-modal-field {
display: flex;
flex-direction: column;
gap: 4px;
}
.llm-modal-field label {
font-size: 11px;
font-weight: 600;
color: #475569;
}
.llm-modal-field input,
.llm-modal-field select,
.llm-modal-field textarea {
border: 1px solid #cbd5e1;
border-radius: 8px;
font-size: 12px;
color: #0f172a;
padding: 7px 8px;
resize: vertical;
}
.node-toggle {
display: inline-flex;
align-items: center;
gap: 10px;
border: 1px solid #cbd5e1;
border-radius: 999px;
background: #fff;
color: #0f172a;
padding: 6px 10px;
cursor: pointer;
width: fit-content;
}
.node-toggle-track {
position: relative;
width: 34px;
height: 20px;
border-radius: 999px;
background: #cbd5e1;
transition: background-color 0.2s ease;
}
.node-toggle-thumb {
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
transition: transform 0.2s ease;
}
.node-toggle-label {
font-size: 12px;
font-weight: 600;
text-transform: lowercase;
}
.node-toggle-on .node-toggle-track {
background: #2563eb;
}
.node-toggle-on .node-toggle-thumb {
transform: translateX(14px);
}
.llm-modal-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.llm-btn {
border-radius: 8px;
padding: 6px 10px;
font-size: 12px;
font-weight: 600;
border: 1px solid transparent;
cursor: pointer;
}
.llm-btn-ghost {
border-color: #cbd5e1;
color: #475569;
background: #ffffff;
}
.llm-btn-primary {
background: #2563eb;
color: #ffffff;
}