/* ===== 3D Spatial View ===== */

/* Cards in 3D space */
.view3d-card {
    width: 200px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.view3d-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.3), 0 4px 20px rgba(0, 0, 0, 0.4);
}

.view3d-card-strip {
    height: 3px;
    width: 100%;
}

.view3d-card-preview {
    height: 110px;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.view3d-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.view3d-card-info {
    padding: 10px 12px;
}

.view3d-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view3d-card-spec {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

/* Connection labels in 3D */
.view3d-conn-label {
    background: rgba(30, 41, 59, 0.85);
    color: #94a3b8;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    border: 1px solid rgba(51, 65, 85, 0.6);
    white-space: nowrap;
    pointer-events: none;
}

/* Group labels in 3D */
.view3d-group-label {
    background: rgba(15, 23, 42, 0.7);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    border: 2px dashed;
    white-space: nowrap;
    pointer-events: none;
}

/* Info overlay */
.view3d-info {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px 16px;
    pointer-events: none;
    z-index: 10;
}

/* Toolbar toggle button */
#view3d-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

#view3d-toggle:hover {
    background: var(--bg);
    color: var(--text);
}

#view3d-toggle.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

#view3d-toggle svg { flex-shrink: 0; }

/* Dark mode adjustments (3D view is always dark, but toggle button follows theme) */
[data-theme="dark"] #view3d-toggle:hover {
    background: #1e293b;
}
