/* ===== GeoAgent Flow Overlay Panel ===== */

.geoagent-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    backdrop-filter: blur(2px);
}

.geoagent-flow-panel {
    position: fixed;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 85vw;
    height: 85vh;
    min-width: 480px;
    min-height: 300px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
    resize: both;
}

/* Resize handle styling */
.geoagent-flow-panel::-webkit-resizable {
    background: transparent;
}

/* Minimized state - collapses to a small bar at the bottom */
.geoagent-flow-panel.minimized {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 48px;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.geoagent-flow-panel.minimized .geoagent-flow-body,
.geoagent-flow-panel.minimized .geoagent-drawflow-container,
.geoagent-flow-panel.minimized .geoagent-flow-footer {
    display: none;
}

.geoagent-flow-panel.minimized .geoagent-flow-header {
    border: none;
    padding: 0 20px;
    cursor: pointer;
}

.geoagent-flow-panel.minimized .geoagent-flow-header .geoagent-header-title {
    font-size: 13px;
}

.geoagent-flow-panel.minimized .geoagent-header-actions .geoagent-close-btn {
    display: none;
}

/* ===== Header Bar ===== */

.geoagent-flow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.geoagent-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.geoagent-header-title-icon {
    font-size: 18px;
}

.geoagent-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.geoagent-minimize-btn,
.geoagent-close-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.geoagent-minimize-btn:hover,
.geoagent-close-btn:hover {
    background: var(--bg-base);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.geoagent-close-btn:hover {
    color: #f85149;
    border-color: #f85149;
}

/* ===== Flow Body (Drawflow + Detail Panel side-by-side) ===== */

.geoagent-flow-body {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

/* ===== Drawflow Container ===== */

.geoagent-drawflow-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 24px 24px;
    cursor: grab;
}

.geoagent-drawflow-container:active {
    cursor: grabbing;
}

#geoAgentDrawflow {
    width: 100%;
    height: 100%;
}

/* Ensure Drawflow's internal canvas fills the container and captures events */
#geoAgentDrawflow .drawflow {
    width: 100%;
    height: 100%;
}

/* Drawflow parent wrapper must not clip pointer events */
#geoAgentDrawflow .parent-drawflow {
    width: 100%;
    height: 100%;
}

/* ===== Footer ===== */

.geoagent-flow-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.geoagent-footer-hint {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

#geoAgentProgressText {
    color: var(--primary-color);
    font-weight: 500;
}

.geoagent-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.geoagent-cancel-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.geoagent-cancel-btn:hover {
    background: var(--bg-base);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.geoagent-regenerate-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.geoagent-regenerate-btn:hover:not(:disabled) {
    background: var(--bg-base);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.geoagent-regenerate-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.geoagent-proceed-btn {
    padding: 8px 24px;
    border: none;
    background: var(--primary-color);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.geoagent-proceed-btn:hover:not(:disabled) {
    filter: brightness(1.15);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.geoagent-proceed-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.geoagent-proceed-btn.executing {
    background: #f0883e;
}

.geoagent-proceed-btn.complete {
    background: var(--secondary-color);
}

/* ===== Drawflow Overrides ===== */

.drawflow {
    background: transparent !important;
}

.drawflow .drawflow-delete {
    display: none !important;
}

.drawflow .drawflow-node {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    min-width: 240px;
    max-width: 300px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    padding: 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.drawflow .drawflow-node:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.drawflow .drawflow-node .inputs,
.drawflow .drawflow-node .outputs {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.drawflow .drawflow-node .input,
.drawflow .drawflow-node .output {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid var(--bg-surface);
    transition: background 0.2s ease;
}

/* Fix connector positions to sit flush with node edges (no gap) */
.drawflow .drawflow-node .input {
    left: -6px;
    top: 2px;
}

.drawflow .drawflow-node .output {
    right: -6px;
    top: 2px;
}

.drawflow .drawflow-node .input:hover,
.drawflow .drawflow-node .output:hover {
    background: var(--primary-color);
}

.drawflow .drawflow-node.selected {
    background: var(--bg-surface) !important;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.drawflow .drawflow-node.node-detail-selected {
    border-color: #388bfd;
    box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.4);
}

/* ===== Connection Lines ===== */

.drawflow .connection .main-path {
    stroke: #4a90d9;
    stroke-width: 2.5;
    opacity: 0.85;
    transition: stroke-width 0.2s ease, opacity 0.2s ease;
}

.drawflow .connection .main-path:hover {
    stroke: #1a6bc4;
    stroke-width: 3.5;
    opacity: 1;
}

/* ===== GeoAgent Node Styling ===== */

.geoagent-node {
    position: relative;
    pointer-events: none; /* Let Drawflow handle drag/connect on the node wrapper */
    cursor: pointer;
}

/* The node comment area is directly interactive */
.geoagent-node .node-comment {
    pointer-events: auto;
}

/* Enable pointer events on input/output connectors for manual connections */
.geoagent-node-wrapper .output,
.geoagent-node-wrapper .input {
    pointer-events: auto;
}

.geoagent-node .node-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px 8px 0 0;
}

.geoagent-node .node-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.geoagent-node .node-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.geoagent-node .node-body {
    padding: 8px 14px;
}

.geoagent-node .node-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
}

.geoagent-node .node-description {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.geoagent-node .node-comment {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 8px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    transition: background 0.2s ease, color 0.2s ease;
}

.geoagent-node .node-comment:hover {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.geoagent-node .node-comment .comment-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.geoagent-node .node-comment .comment-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.geoagent-node .node-comment.has-comment {
    background: rgba(88, 166, 255, 0.06);
    border-top-color: rgba(88, 166, 255, 0.2);
    color: var(--primary-color);
}

.geoagent-node .node-comment.has-comment .comment-text {
    font-style: italic;
}

/* ===== Node Status Indicator ===== */

.node-status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.node-status-indicator .node-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: node-spin 0.8s linear infinite;
}

.node-status-indicator .node-check {
    color: #66bb6a;
    font-size: 16px;
    font-weight: bold;
}

.node-status-indicator .node-error-x {
    color: #ef5350;
    font-size: 16px;
    font-weight: bold;
}

.node-status-indicator .node-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 2px;
}

@keyframes node-spin {
    to { transform: rotate(360deg); }
}

/* ===== Node Status State Classes ===== */

.drawflow-node.node-pending {
    border-color: #555;
    opacity: 0.7;
}

.drawflow-node.node-running {
    border-color: var(--primary-color);
    animation: node-pulse 1.5s ease-in-out infinite;
    opacity: 1;
}

.drawflow-node.node-complete {
    border-color: #66bb6a;
    opacity: 1;
}

.drawflow-node.node-error {
    border-color: #ef5350;
    opacity: 1;
}

.node-error-msg {
    background: rgba(239, 83, 80, 0.15);
    border: 1px solid rgba(239, 83, 80, 0.4);
    border-radius: 4px;
    color: #ef5350;
    font-size: 11px;
    line-height: 1.3;
    padding: 4px 8px;
    margin-top: 6px;
    word-break: break-word;
    max-height: 60px;
    overflow-y: auto;
}

@keyframes node-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(88, 166, 255, 0);
    }
}

/* Flash animation for refined/updated nodes */
.drawflow-node.node-flash {
    animation: node-flash-anim 0.5s ease-in-out 3;
}

@keyframes node-flash-anim {
    0%, 100% { background: var(--bg-surface); }
    50% { background: rgba(88, 166, 255, 0.15); }
}

/* ===== Clarification Form ===== */

.geoagent-clarification {
    padding: 4px 0;
}

.geoagent-clarification-header {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 14px;
    font-size: 14px;
}

.geoagent-question {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.geoagent-question:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
}

.geoagent-question-text {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 500;
}

.geoagent-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.geoagent-option {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-base);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.geoagent-option:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    background: var(--primary-dark);
}

.geoagent-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-muted);
    color: var(--text-muted);
    font-weight: 600;
}

.geoagent-free-input {
    margin-top: 4px;
}

.geoagent-text-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.geoagent-text-input:focus {
    border-color: var(--primary-color);
}

.geoagent-submit-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin-top: 12px;
    border: none;
    border-radius: 8px;
    background: var(--text-muted);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.geoagent-submit-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

/* ===== New Analysis Button ===== */

.geoagent-new-analysis {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.geoagent-new-btn {
    padding: 6px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: transparent;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.geoagent-new-btn:hover {
    background: var(--primary-muted);
}

/* ===== Responsive ===== */

@media (max-width: 1200px) {
    .geoagent-flow-panel {
        width: 92vw;
        height: 85vh;
    }
}

@media (max-width: 768px) {
    .geoagent-flow-panel {
        width: 96vw;
        height: 90vh;
        top: 2vh;
        border-radius: 8px;
    }

    .geoagent-flow-panel.minimized {
        width: 280px;
    }
}

/* ===== Reopen Flow Bar (above chat input) ===== */

.geoagent-reopen-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(124, 58, 237, 0.1));
    border-top: 1px solid rgba(88, 166, 255, 0.3);
    border-bottom: 1px solid rgba(88, 166, 255, 0.3);
    flex-shrink: 0;
}

.geoagent-reopen-bar-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.geoagent-reopen-flow-btn {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.geoagent-reopen-flow-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

/* ===== Node Description ===== */

.geoagent-node .node-description {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
}

/* ===== Save Button in Flow Panel Header ===== */

.geoagent-save-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.geoagent-save-btn:hover {
    background: var(--primary-muted);
    border-color: var(--primary-color);
}

/* ===== Saved Flows List ===== */

.saved-flows-container {
    margin: 12px 0;
    padding: 0;
}

.saved-flows-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.saved-flows-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.saved-flows-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saved-flow-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 8px 12px;
}

.saved-flow-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-elevated, var(--bg-surface));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.saved-flow-info {
    flex: 1;
    min-width: 0;
}

.saved-flow-name {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 4px;
}

.saved-flow-name:hover .saved-flow-name-text {
    color: var(--primary-color);
    text-decoration: underline;
}

.saved-flow-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.saved-flow-name-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.saved-flow-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 11px;
    color: var(--text-secondary);
}

.saved-flow-meta span {
    white-space: nowrap;
}

.saved-flow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.saved-flow-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    font-family: inherit;
}

.saved-flow-run-btn {
    background: linear-gradient(135deg, #238636, #2ea043);
    color: #fff;
    border-color: #238636;
}

.saved-flow-run-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 2px 8px rgba(35, 134, 54, 0.4);
}

.saved-flow-edit-btn {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--primary-color);
}

.saved-flow-edit-btn:hover {
    background: var(--primary-muted);
}

.saved-flow-delete-btn {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding: 5px 8px;
}

.saved-flow-delete-btn:hover {
    color: #f85149;
    background: rgba(248, 81, 73, 0.1);
}

/* ===== Responsive for Saved Flows ===== */

@media (max-width: 768px) {
    .saved-flow-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .saved-flow-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .saved-flow-meta {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* ===== Flow Chat Area ===== */

.geoagent-flow-chat {
    border-top: 1px solid var(--border-color, #30363d);
    background: var(--bg-elevated, #161b22);
    flex-shrink: 0;
}

.flow-chat-messages {
    max-height: 120px;
    overflow-y: auto;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flow-chat-messages:empty {
    display: none;
}

.flow-chat-msg {
    font-size: 12px;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 6px;
    max-width: 85%;
}

.flow-chat-msg.user {
    background: var(--primary-color, #388bfd);
    color: var(--text-muted);
    align-self: flex-end;
}

.flow-chat-msg.ai {
    background: var(--bg-surface, #0d1117);
    color: var(--text-primary, #c9d1d9);
    border: 1px solid var(--border-color, #30363d);
    align-self: flex-start;
}

.flow-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 8px 16px 10px;
    align-items: flex-end;
}

.flow-chat-input {
    flex: 1;
    background: var(--bg-surface, #0d1117);
    color: var(--text-primary, #c9d1d9);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    min-height: 36px;
}

.flow-chat-input:focus {
    border-color: #388bfd;
    outline: none;
}

.flow-chat-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.flow-chat-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.flow-chat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.flow-chat-btn.rewrite-btn {
    background: #da3633;
    color: white;
}

.flow-chat-btn.rewrite-btn:hover:not(:disabled) {
    background: #f85149;
}

.flow-chat-btn.addnode-btn {
    background: #238636;
    color: white;
}

.flow-chat-btn.addnode-btn:hover:not(:disabled) {
    background: #2ea043;
}

/* ===== Node Detail Panel (right side slide-in) ===== */

.geoagent-node-detail-panel {
    width: 340px;
    min-width: 300px;
    height: 100%;
    background: var(--bg-elevated, #f6f8fa);
    border-left: 2px solid var(--border-color, #d0d7de);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;
    animation: slideInRight 0.2s ease-out;
    flex-shrink: 0;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.node-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #d0d7de);
    background: var(--bg-surface, #ffffff);
    flex-shrink: 0;
}

.node-detail-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.node-detail-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.node-detail-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2328);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-detail-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #656d76);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.node-detail-close-btn:hover {
    background: var(--bg-hover, #eaeef2);
    color: var(--text-primary, #1f2328);
}

.node-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.node-detail-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.node-detail-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #656d76);
    margin: 0;
}

.node-detail-explanation {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary, #1f2328);
    margin: 0;
    background: var(--bg-surface, #ffffff);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #d0d7de);
}

.node-detail-comment {
    width: 100%;
    background: var(--bg-surface, #ffffff);
    color: var(--text-primary, #1f2328);
    border: 1px solid var(--border-color, #d0d7de);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.node-detail-comment:focus {
    border-color: #388bfd;
    outline: none;
}

.node-detail-save-btn {
    background: #238636;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-end;
}

.node-detail-save-btn:hover {
    background: #2ea043;
}

/* ===== Coming Soon Placeholder ===== */

.geoagent-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    gap: 12px;
    color: #8b949e;
    user-select: none;
}

.coming-soon-icon {
    font-size: 64px;
    opacity: 0.6;
}

.coming-soon-title {
    font-size: 24px;
    font-weight: 600;
    color: #c9d1d9;
    margin: 0;
}

.coming-soon-text {
    font-size: 14px;
    color: #8b949e;
    margin: 0;
    text-align: center;
    max-width: 360px;
}
